Browse Source

Added a small amount of test code

Thomas Johnson 5 months ago
parent
commit
e0db3fb925
2 changed files with 3 additions and 1 deletions
  1. 1
    1
      Makefile
  2. 2
    0
      main.c

+ 1
- 1
Makefile View File

@@ -1,7 +1,7 @@
1 1
 objs = main.o tree_alloc.o util.o
2 2
 
3 3
 CC = clang
4
-COMMON_FLAGS = -std=c11
4
+COMMON_FLAGS = -std=gnu11
5 5
 OUT_NAME = the_alloc
6 6
 
7 7
 dev: CFLAGS= $(COMMON_FLAGS) -g -D UNIT_TESTS

+ 2
- 0
main.c View File

@@ -26,5 +26,7 @@ int main() {
26 26
     get_new_region,
27 27
     error,
28 28
   };
29
+  void *reg = alloc(&arena, 20, 4);
30
+  unalloc(&arena, reg);
29 31
 	return 0;
30 32
 }

Loading…
Cancel
Save