BlockContext's caller is now stored in sender field
[panda.git] / tests / test-heap.c
blob4604f7ed89384eca05f10040b291e07753807919
3 #include <st-compiler.h>
4 #include <st-universe.h>
5 #include <st-system.h>
7 #include <stdio.h>
8 #include <stdlib.h>
9 #include <stdbool.h>
10 #include <unistd.h>
12 int
13 main (int argc, char *argv[])
15 st_pointer start;
16 st_uint size;
18 st_heap *heap;
20 heap = st_heap_new (1024 * 1024 * 1024);
21 if (!heap)
22 abort ();
24 st_assert (st_heap_grow (heap, 512 * 1024 * 1024));
25 st_assert (st_heap_grow (heap, 256 * 1024 * 1024));
26 st_assert (st_heap_shrink (heap, 512 * 1024 * 1024));
28 while (true)
29 sleep (1);
31 return 0;