ebruakagunduz

write per 4kb

Jan 6th, 2015
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main() {
  5. int *a = malloc(409600000);
  6. int j = 0;
  7. for (i = 0; i < 100000; i++) {
  8. a[j] = 1;
  9. j += 1024;
  10. }
  11.  
  12. printf("Pages allocated.\n");
  13. getchar();
  14. return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment