发布时间:2013-04-21 15:34:14
#include "stdio.h"#include "stddef.h"void main (int argc,char *argv[]){void *p=sbrk(0);//the top of the heapint *p1=(int *)p;brk(p1+4);//change the heap size,allocate 4*4 bytes to the heapprintf("malloc %d byte!\n",sbrk(0)-(int)p);p=sbrk(0); brk(p+100); //allocate 100 bytes .........【阅读全文】