10 unsigned long last_heap_size = 0;
14 for (i = 0; i < COUNT; i++) {
15 int **p = GC_MALLOC(sizeof(int *));
16 int *q = GC_MALLOC_ATOMIC(sizeof(int));
18 if (p == 0 || *p != 0) {
19 fprintf(stderr, "GC_malloc returned garbage (or NULL)\n");
23 *p = GC_REALLOC(q, 2 * sizeof(int));
26 unsigned long heap_size = (unsigned long)GC_get_heap_size();
27 if (heap_size != last_heap_size) {
28 printf("Heap size: %lu\n", heap_size);
29 last_heap_size = heap_size;