malloc.c 437 B

123456789101112131415161718
  1. /* -*- mode:c; c-file-style:"k&r"; c-basic-offset: 4; tab-width:4; indent-tabs-mode:nil; mode:auto-fill; fill-column:78; -*- */
  2. /* vim: set ts=4 sw=4 et tw=78 fo=cqt wm=0: */
  3. #include <stdlib.h>
  4. #include <stdio.h>
  5. int main(int argc, char ** argv)
  6. {
  7. for (int i = 0 ; i < 100000 ; i++) {
  8. malloc(16);
  9. malloc(32);
  10. malloc(64);
  11. malloc(128);
  12. malloc(256);
  13. malloc(512);
  14. }
  15. return 0;
  16. }