Here is the code:
I useCode:#include <stdlib.h> #include <stdio.h> int main(int argc, char *argv[]){ char *buffer; int num_byte; num_byte = atoi(argv[1])*1024; while(1) {buffer=malloc(num_byte); free(buffer); } }It reports:strace ./code 126
Anybody knows why no more brk()? Note that my code adopts an indefinite loop...Code:.... brk(0) = 0x804965c brk(0x8068e74) = 0x8068e74 brk(0x8069000) = 0x8069000 (Nothing further)