• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <unistd.h>
2 
3 volatile void *ptr;
4 
5 /* The default size of the brk segment is 8 MB.
6    Request more than that in a sequence of requests */
main()7 int main()
8 {
9    int i;
10    for (i=0; i < 10; ++i) {
11       ptr = sbrk(1024*1024);
12    }
13    return 0;
14 }
15