Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cd /tmp
- cat > test.c <<"EOF"
- #include <stdlib.h>
- #include <stdio.h>
- int main()
- {
- size_t allocated=0;
- while(1)
- {
- const size_t chunkSize=4096;
- char* p=malloc(chunkSize);
- if(!p) return 0;
- *p=1;
- allocated+=chunkSize;
- printf("%zun",allocated);
- }
- }
- EOF
- gcc test.c -o test -m32 && ./test | tail -n1
Add Comment
Please, Sign In to add comment