Merge: doc: fixed some typos and other misc. corrections
[nit.git] / clib / gc.h
index 8dd4af2..18395a5 100644 (file)
--- a/clib/gc.h
+++ b/clib/gc.h
 #include <stdio.h>
 #include <errno.h>
 #include "nit_common.h"
-#include "gc_static_objects_list.h"
 
-/* Markbit manipulations */
-#define GET_MARKBIT(x) (((val_t)(x[0].vft)) & 1)
-#define SET_MARKBIT(x) ((x)->vft = (void*)(((bigint)((x)->vft)) | 1))
-#define REMOVE_MARKBIT(x) (x ^ 1)
+void Nit_gc_init(void);
 
-#define HEAP_ACTIVE_SIZE_MIN 3000
+void *Nit_gc_malloc(size_t size);
 
-typedef struct heap {
-       char *heapPointer;
-       unsigned long size;
-}heap;
+void GC_add_static_object(val_t *pointer);
 
-typedef struct TBOX_struct {
-       const classtable_elt_t * vft;
-       char * val;
-       bigint object_id;
-} * BOX_struct;
-
-heap* heapActive;
-heap* heapInactive;
-char *allocationPointer;
-char *evacuationPointer;
-char *scavengingPointer;
-
-unsigned long heapActiveUsedSize;
-
-GC_List staticObjects;
-
-void Nit_gc_init();
-
-val_t GC_evacuation(obj_t object);
-
-void GC_scavenging();
-
-void* Nit_gc_malloc( size_t size );
-
-void GC_add_static_object(val_t * pointer);
+void Nit_gc_force_garbage_collection( void );
 
 #endif