You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
262 B
19 lines
262 B
6 years ago
|
#define _GNU_SOURCE
|
||
|
#include <assert.h>
|
||
|
#include <unistd.h>
|
||
|
|
||
|
int main(void) {
|
||
|
void *b;
|
||
|
char *p, *end;
|
||
|
|
||
|
b = sbrk(0);
|
||
|
p = (char *)b;
|
||
|
end = p + 0x1000000;
|
||
|
brk(end);
|
||
|
while (p < end) {
|
||
|
*(p++) = 1;
|
||
|
}
|
||
|
brk(b);
|
||
|
return 0;
|
||
|
}
|