首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

tc 用户内存解决方法

2012-03-09 
tc 用户内存tc提供给用户的内存有64KB,但我写了一个测试程序,测试结果怎么只有61KB。请高手帮忙解答,谢谢!!

tc 用户内存
tc提供给用户的内存   有64KB,但我写了一个   测试程序,测试结果怎么只有61KB。请高手   帮忙解答,谢谢!!!

代码如下:
#include   <stdio.h>
#include   <stdlib.h>
main()
{
        int   KB   =   0;
        while(   malloc(1   < <   10)   )   KB   +=   1;
        printf( "Allocated   total   %d   KB ",   KB);
}
在tc   2.0下运行结果:
Allocated   total   61   KB


[解决办法]
调整 内存模式
[解决办法]
malloc是在堆上 分配的

热点排行