2006-08-18 Roger Sayle <roger@eyesopen.com>
[official-gcc.git] / boehm-gc / tests / middle.c
blob5d9360af521dfe1839667dc8c6dc748dec39b090
1 /*
2 * Test at the boundary between small and large objects.
3 * Inspired by a test case from Zoltan Varga.
4 */
5 #include <gc.h>
6 #include <stdio.h>
8 int main ()
10 int i;
12 GC_all_interior_pointers = 0;
14 for (i = 0; i < 20000; ++i) {
15 GC_malloc_atomic (4096);
16 GC_malloc (4096);
18 for (i = 0; i < 20000; ++i) {
19 GC_malloc_atomic (2048);
20 GC_malloc (2048);
22 printf("Final heap size is %ld\n", GC_get_heap_size());
23 return 0;