s/heap_page/pic_heap/g

This commit is contained in:
Yuichi Nishiwaki 2013-11-22 07:19:31 -08:00
parent e6523730a4
commit 579735d16e
4 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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

View File

@ -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 */

View File

@ -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();