一、原型:extern void *malloc(unsigned int num_bytes);头文件:#include 或 #include (注意:alloc.h 与 malloc.h 的内容是全然一致的。)功能:分配长度为num_bytes字节的内存块说明:假设分配成功则返回指向被分配内.....
分类:
其他好文 时间:
2015-01-02 21:01:54
阅读次数:
195
#define rdtscll(val) \__asm__ __volatile__ ("rdtsc" : "=A" (val))example#includeint i;unsigned long e;#define as(p) \__asm__ __volatile__ (p)#define r...
分类:
其他好文 时间:
2015-01-01 23:47:43
阅读次数:
311
linux下是这样定义的:在linux的实现中pthread_t被定义为 "unsigned long int",參考这里Windows下这样定义: /* * Generic handle type - intended to extend uniqueness beyond ...
分类:
其他好文 时间:
2015-01-01 16:00:43
阅读次数:
120
1.创建表 create table 表名 ( id int unsigned not null auto_increment primary key, 字段 列类型 not null default '', …… 字段 列类型 not null default '' ) e...
分类:
数据库 时间:
2014-12-31 21:18:05
阅读次数:
169
Agenda
?如何获得当前时间
?如何度量时间差,
如何比较时间
?如何将操作延迟指定的一段时间
?如何调度异步函数到指定的时间之后执行
?如何获得当前时间
?HZ: 宏定义,
每秒的时间中断次数
?Jiffies变量:
系统引导时初始化为0,
每发生一次时间中断就加1
–#include
–unsigned long j, stamp_1, stamp_...
分类:
其他好文 时间:
2014-12-31 16:18:05
阅读次数:
145
1.关于 unsigned 的注意事项:
1.unsigned int 可以缩写成 unsigned
2.当用到char类型时,char 有3种形势,char, signed char 和unsigned char , 当我们写char 时,编译器会从signed char 和unsigned char 中选一种。signed char 是 -127 ~ 127, unsigned cha...
分类:
编程语言 时间:
2014-12-31 10:10:21
阅读次数:
168
stm8s103 PWM的设置不难,但是很多人不注意选项字节这个问题,PWM是IO口的第二功能,要用ST Visual Programmer 修改选项字节。只需要修改AFR0的功能就可以了其中初始化代码如下void TIM1_PWM_Init(unsigned int TIM1_CH1_Period...
分类:
其他好文 时间:
2014-12-30 18:47:54
阅读次数:
249
错误来源
.\ECAT\inc\STM32appl.h(38): error: #147: declaration is incompatible with "unsigned shortnPdInputSize" (declared at line 396 of ".\ECAT\inc\ecatslv.h")
extern UINT16 nPdInputSize;
.\ECAT\inc...
分类:
其他好文 时间:
2014-12-30 17:10:20
阅读次数:
1002
响应2月底appstore 64位APP的上线要求,开始编译IOS arm64版本引擎库。编译arm64遇到一些问题,在此记录。1. 数据类型的错误 __int64 相关,提示缺少;分号typedef __int64 int64_t;typedef unsigned __int64 uint64_t...
分类:
其他好文 时间:
2014-12-30 16:46:54
阅读次数:
226
实际读取图片的代码已经上传到我的资源里面; 下面贴出使用例子:
unsigned char* esLoadJPG(const char *fileName, int *width, int *height, int *size)
{
FILE *f = fopen(fileName, "rb");
fseek(f, 0, SEEK_END);
*size ...
分类:
系统相关 时间:
2014-12-30 11:41:37
阅读次数:
276