s/heap_page/pic_heap/g
This commit is contained in:
parent
e6523730a4
commit
579735d16e
|
@ -66,7 +66,7 @@ typedef struct {
|
||||||
jmp_buf *jmp;
|
jmp_buf *jmp;
|
||||||
const char *errmsg;
|
const char *errmsg;
|
||||||
|
|
||||||
struct heap_page *heap;
|
struct pic_heap *heap;
|
||||||
struct pic_object *arena[PIC_ARENA_SIZE];
|
struct pic_object *arena[PIC_ARENA_SIZE];
|
||||||
int arena_idx;
|
int arena_idx;
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,11 @@ union header {
|
||||||
long alignment; /* force alignment for headers to be allocated at the size of long */
|
long alignment; /* force alignment for headers to be allocated at the size of long */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct heap_page {
|
struct pic_heap {
|
||||||
union header base, *freep;
|
union header base, *freep;
|
||||||
size_t heap_size;
|
size_t heap_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
void init_heap_page(struct heap_page *);
|
void init_heap(struct pic_heap *);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
2
src/gc.c
2
src/gc.c
|
@ -14,7 +14,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
init_heap_page(struct heap_page *heap)
|
init_heap(struct pic_heap *heap)
|
||||||
{
|
{
|
||||||
heap->base.s.ptr = heap->freep = &heap->base;
|
heap->base.s.ptr = heap->freep = &heap->base;
|
||||||
heap->base.s.size = 0; /* not 1, since it must never be fused into other headers */
|
heap->base.s.size = 0; /* not 1, since it must never be fused into other headers */
|
||||||
|
|
|
@ -43,8 +43,8 @@ pic_open(int argc, char *argv[], char **envp)
|
||||||
pic->rlen = PIC_RESCUE_SIZE;
|
pic->rlen = PIC_RESCUE_SIZE;
|
||||||
|
|
||||||
/* memory heap */
|
/* memory heap */
|
||||||
pic->heap = (struct heap_page *)calloc(1, sizeof(struct heap_page));
|
pic->heap = (struct pic_heap *)calloc(1, sizeof(struct pic_heap));
|
||||||
init_heap_page(pic->heap);
|
init_heap(pic->heap);
|
||||||
|
|
||||||
/* symbol table */
|
/* symbol table */
|
||||||
pic->sym_tbl = xh_new();
|
pic->sym_tbl = xh_new();
|
||||||
|
|
Loading…
Reference in New Issue