summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index ae5b634e38..49b54e8b26 100644
--- a/gc.c
+++ b/gc.c
@@ -6127,7 +6127,7 @@ objspace_malloc_increase(rb_objspace_t *objspace, void *mem, size_t new_size, si
rb_bug("objspace_malloc_increase: underflow malloc_params.allocated_size.");
}
#endif
- atomic_sub_nounderflow(objspace->malloc_params.allocated_size, dec_size);
+ atomic_sub_nounderflow(&objspace->malloc_params.allocated_size, dec_size);
}
if (0) fprintf(stderr, "incraese - ptr: %p, type: %s, new_size: %d, old_size: %d\n",
@@ -6145,7 +6145,7 @@ objspace_malloc_increase(rb_objspace_t *objspace, void *mem, size_t new_size, si
{
size_t allocations = objspace->malloc_params.allocations;
if (allocations > 0) {
- atomic_sub_nounderflow(objspace->malloc_params.allocations, 1);
+ atomic_sub_nounderflow(&objspace->malloc_params.allocations, 1);
}
#if MALLOC_ALLOCATED_SIZE_CHECK
else {