enum don't allocate any memory
int main()
{
_asm{
mov edi,edi
mov edi,edi
}
enum Color{Red=,Green,Yellow};
_asm{
mov edi,edi
mov edi,edi
}
Color c=Red;
//The only valid values that you can assign to an enumeration variable without a type
//cast are the enumerator values used in defining the type.
//c=13; c=Color(); int count;
count=Red+; return ;
};
然后查看assembly,
5: _asm{
6: mov edi,edi
0041139E 8B FF mov edi,edi
7: mov edi,edi
004113A0 8B FF mov edi,edi
8: }
9: enum Color{Red=12,Green,Yellow};
10: _asm{
11: mov edi,edi
004113A2 8B FF mov edi,edi
12: mov edi,edi
004113A4 8B FF mov edi,edi
13: }
可以说明:
声明enum don't allocate any memory.
enum don't allocate any memory的更多相关文章
- zabbix登陆问题:cannot allocate shared memory for collector
问题说明:在一台zabbix被监控服务器上(64位centos6.8系统,64G内容)启动zabbix_agent,发现进程无法启动,10050端口没有起来! 启动zabbix_agent进程没有报错 ...
- MySQL:cannot allocate the memory for the buffer pool
InnoDB: The InnoDB memory heap is disabled InnoDB: Mutexes and rw_locks use GCC atomic builtins Inno ...
- 解决zabbix的cannot allocate shared memory of size错误
问题状态:zabbix_server 不能启动,系统CentOS 6.7 原因分析:这是因为内核对share memory的限制造成的. 用到如下命令ipcs [-m|l|a],sysctl [-a| ...
- Operating System Memory Management、Page Fault Exception、Cache Replacement Strategy Learning、LRU Algorithm
目录 . 引言 . 页表 . 结构化内存管理 . 物理内存的管理 . SLAB分配器 . 处理器高速缓存和TLB控制 . 内存管理的概念 . 内存覆盖与内存交换 . 内存连续分配管理方式 . 内存非连 ...
- CUDA ---- Memory Model
Memory kernel性能高低是不能单纯的从warp的执行上来解释的.比如之前博文涉及到的,将block的维度设置为warp大小的一半会导致load efficiency降低,这个问题无法用war ...
- CUDA02 - 访存优化和Unified Memory
CUDA02 - 的内存调度与优化 前面一篇(传送门)简单介绍了CUDA的底层架构和一些线程调度方面的问题,但这只是整个CUDA的第一步,下一个问题在于数据的访存:包括数据以何种形式在CPU/GPU之 ...
- Pointers and Dynamic Allocation of Memory
METHOD 1: Consider the case where we do not know the number of elements in each row at compile time, ...
- Android内存管理(4)*官方教程 含「高效内存的16条策略」 Managing Your App's Memory
Managing Your App's Memory In this document How Android Manages Memory Sharing Memory Allocating and ...
- DTrace to Troubleshoot Java Native Memory Problems
How to Use DTrace to Troubleshoot Java Native Memory Problems on Oracle Solaris 11 Hands-On Labs of ...
随机推荐
- Git 常用命令速查表(图文+表格)【转】
转自:http://www.jb51.net/article/55442.htm 一. Git 常用命令速查 git branch 查看本地所有分支git status 查看当前状态 git comm ...
- python logging system
官方教程:https://docs.python.org/2/library/logging.html 1. 用法1 import logging import logging.handlers L ...
- 批量导出文件名 另存为bat文件
@echo offdir /b *.* > 导出的文件名.txtexit
- IE8下面的line-height的bug
当line-height小于正常值时,超出的部分将被剪裁掉
- linux命令(23):cp命令
实例一:复制单个文件到目标目录 cp 1.log /home 说明: 1.在没有带-a参数时,两个文件的时间是不一样的.在带了-a参数时,两个文件的时间是一致的. 2.当目标文件已存在,会询问是否覆盖 ...
- linux命令(11):df命令
1.查看磁盘空间和当前的磁盘数:df –lh或者df –i 2.显示指定类型磁盘:df -t ext4 3.列出各文件系统的i节点使用情况:df -ia 4.列出文件系统的类型:df -T
- ZOJ-2753
Min Cut (Destroy Trade Net) Time Limit: 15 Seconds Memory Limit: 32768 KB Given an undirected g ...
- session和cookie基本操作
session的作用同cookie一样: 1.在不同页面使用同一数组 2.实现验证码,用户跟踪(个人觉得这个用到的其实还是1中的作用) session相对于cookie更加的安全 先来说一下cooki ...
- AC日记——国王游戏 洛谷 P1080
国王游戏 思路: 贪心+高精: 代码: #include <bits/stdc++.h> using namespace std; #define maxn 1005 struct Dat ...
- Python基础系列----语法、数据类型、变量、编码
1.基本语法 Python ...