mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-04 03:36:34 +02:00
Avoid unnecessary call to gc_allocated_bytes
This commit is contained in:
parent
d02437a0c5
commit
5c1048bfe0
1 changed files with 1 additions and 2 deletions
3
gc.c
3
gc.c
|
@ -633,8 +633,7 @@ void *gc_try_alloc(gc_heap * h, int heap_type, size_t size, char *obj,
|
||||||
// Copy object into heap now to avoid any uninitialized memory issues
|
// Copy object into heap now to avoid any uninitialized memory issues
|
||||||
gc_copy_obj(f2, obj, thd);
|
gc_copy_obj(f2, obj, thd);
|
||||||
//h->free_size -= gc_allocated_bytes(obj, NULL, NULL);
|
//h->free_size -= gc_allocated_bytes(obj, NULL, NULL);
|
||||||
ck_pr_sub_ptr(&(thd->cached_heap_free_sizes[heap_type]),
|
ck_pr_sub_ptr(&(thd->cached_heap_free_sizes[heap_type]), size);
|
||||||
gc_allocated_bytes(obj, NULL, NULL));
|
|
||||||
} else {
|
} else {
|
||||||
ck_pr_add_int(&(thd->heap_num_huge_allocations), 1);
|
ck_pr_add_int(&(thd->heap_num_huge_allocations), 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue