Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <unistd.h>
- void *malloc(int size) {
- write(2,"I malloc'd\n",sizeof("I malloc'd\n"));
- return NULL;
- }
- void alloc_one_meg() {
- int *pmeg = (int *) malloc(250000*sizeof(int));
- int *p = pmeg;
- }
- main()
- {
- int i;
- for (i=0; i<1000; i++) {
- alloc_one_meg();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement