don't use bit field

This commit is contained in:
Yuichi Nishiwaki 2015-05-27 22:49:29 +09:00
parent 81be1b9e3e
commit 2bfb6876eb
1 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@ union header {
struct { struct {
union header *ptr; union header *ptr;
size_t size; size_t size;
unsigned int mark : 1; char mark;
} s; } s;
long alignment[2]; long alignment[2];
}; };
@ -93,7 +93,7 @@ add_heap_page(pic_state *pic)
nu = (PIC_HEAP_PAGE_SIZE + sizeof(union header) - 1) / sizeof(union header) + 1; nu = (PIC_HEAP_PAGE_SIZE + sizeof(union header) - 1) / sizeof(union header) + 1;
up = (union header *)pic_calloc(pic, 1 + nu + 1, sizeof(union header)); up = pic_calloc(pic, 1 + nu + 1, sizeof(union header));
up->s.size = nu + 1; up->s.size = nu + 1;
up->s.mark = PIC_GC_UNMARK; up->s.mark = PIC_GC_UNMARK;
gc_free(pic, up); gc_free(pic, up);
@ -104,7 +104,7 @@ add_heap_page(pic_state *pic)
up->s.size = 1; up->s.size = 1;
up->s.ptr = np; up->s.ptr = np;
page = (struct heap_page *)pic_alloc(pic, sizeof(struct heap_page)); page = pic_alloc(pic, sizeof(struct heap_page));
page->basep = up; page->basep = up;
page->endp = up + nu + 1; page->endp = up + nu + 1;
page->next = pic->heap->pages; page->next = pic->heap->pages;