gc: superficial cleaning
[nit.git] / clib / nit_common.h
index 2d4f9df..8bf9cfc 100644 (file)
 #include <stdio.h>
 #include <string.h>
 
-#ifdef WITH_LIBGC
-#include <gc/gc.h>
-#define malloc(x) GC_MALLOC((x))
-#define calloc(x,y) GC_MALLOC((x)*(y))
-#endif
-
-
-
 /* *** Types *** */
 typedef signed long int bigint;        /* standard int value, must be larger that any poiner */
 typedef bigint (*fun_t) (bigint);                                      /* generic function pointer */
@@ -116,7 +108,11 @@ extern bigint object_id_counter;
 
 #define VAL_ISA(e, c, i) (VAL2VFT((e))[(c)].cid == (cid_t)(i))
 
-void * alloc(size_t);
+/* GC and memory management */
+void *alloc(size_t); /* allocate memory to store an object with an object header */
+void *raw_alloc(size_t); /* allocate raw memory to store a raw stram of byte */
+void register_static_object(val_t*); /* mark that something is a global or once object */
+
 extern val_t G_args;
 extern val_t G_stdin;
 extern val_t G_stdout;