Skip to content

Commit 3d98058

Browse files
committed
rename live_obj.page_kind to page_kinds as it is flag
1 parent 5803d64 commit 3d98058

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/gc.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,7 @@ HL_API void hl_gc_dump_memory( const char *filename ) {
14481448
typedef struct {
14491449
hl_type *t;
14501450
int count;
1451-
int page_kind;
1451+
int page_kinds;
14521452
varray *arr;
14531453
int index;
14541454
} gc_live_obj;
@@ -1466,7 +1466,7 @@ static void gc_count_live_block( void *block, int size ) {
14661466
}
14671467

14681468
static void gc_count_live_page( gc_pheader *p, int private_data ) {
1469-
if( (1 << p->page_kind) & live_obj.page_kind )
1469+
if( (1 << p->page_kind) & live_obj.page_kinds )
14701470
gc_iter_live_blocks(p, gc_count_live_block);
14711471
}
14721472

@@ -1478,9 +1478,9 @@ static int hl_gc_get_live_objects( hl_type *t, varray *arr ) {
14781478

14791479
live_obj.t = t;
14801480
live_obj.count = 0;
1481-
live_obj.page_kind = (1 << MEM_KIND_DYNAMIC) + (1 << MEM_KIND_NOPTR);
1481+
live_obj.page_kinds = (1 << MEM_KIND_DYNAMIC) + (1 << MEM_KIND_NOPTR);
14821482
if (t->kind == HOBJ) {
1483-
live_obj.page_kind = hl_get_obj_rt(t)->hasPtr ? 1 << MEM_KIND_DYNAMIC : 1 << MEM_KIND_NOPTR;
1483+
live_obj.page_kinds = hl_get_obj_rt(t)->hasPtr ? 1 << MEM_KIND_DYNAMIC : 1 << MEM_KIND_NOPTR;
14841484
}
14851485
live_obj.arr = arr;
14861486
live_obj.index = 0;

0 commit comments

Comments
 (0)