Home | History | Annotate | Download | only in tests
      1 // This test does enough allocation and deallocation that the time-unit,
      2 // when measured in bytes -- 6,000,000,000 -- exceeds 32-bits.  It also does
      3 // it in a slightly uneven fashion so we get a range of different totals
      4 // for the snapshots, including a zero-sized detailed snapshot.
      5 
      6 #include <stdlib.h>
      7 
      8 int main(void)
      9 {
     10    int i, *x1, *x2, *x3, *x4;
     11    for (i = 0; i < 1500; i++) {
     12       x1 = malloc( 800 * 1000);
     13       x2 = malloc(1100 * 1000);
     14       free(x1);
     15       x3 = malloc(1200 * 1000);
     16       free(x2);
     17       free(x3);
     18       x4 = malloc( 900 * 1000);
     19       free(x4);
     20    }
     21    return 0;
     22 }
     23