add GC arena

This commit is contained in:
Yuichi Nishiwaki
2013-10-13 17:02:29 +09:00
parent 012b387c89
commit ee985a31cd
3 changed files with 29 additions and 0 deletions
+3
View File
@@ -11,6 +11,7 @@ struct pic_env {
struct pic_env *parent;
};
#define PIC_ARENA_SIZE 1024
#define PIC_HEAP_SIZE 1024
typedef struct {
@@ -20,6 +21,8 @@ typedef struct {
struct pic_env *global_env;
struct heap_page *heap;
struct pic_object *arena[PIC_ARENA_SIZE];
int arena_idx;
} pic_state;
void *pic_alloc(pic_state *, size_t);