| www.delorie.com/djgpp/doc/libc-2.01/libc_71.html | search |
#include <stdlib.h> int brk(void *ptr);
This function changes the break for the program. This is the
first address that, if referenced, will cause a fault to occur. The
program asks for more memory by specifying larger values for ptr.
Normally, this is done transparently through the malloc function.
zero if the break was changed, -1 if not. errno is set to the error.
if (brk(old_brk+1000))
printf("no memory\n");
Go to the first, previous, next, last section, table of contents.
| prev next webmaster | delorie software privacy |
| Copyright © 1997 | Updated Apr 1997 |