JLU_WangCT

导航

进程内存分配大小上限查询

#include <stdio.h>
#include <stdlib.h>

int main()
{
int MB = 0;
while(malloc(1 << 20) )MB++;
printf("Allocated %d MB total\n", MB);
return 0;
}

posted on 2011-12-03 00:24  WangCT  阅读(298)  评论(1编辑  收藏  举报