diff --git a/src/gc/alloc_resources.c b/src/gc/alloc_resources.c
index 6930bb8..4468512 100644
a
|
b
|
|
724 | 724 | else { |
725 | 725 | /* Note that we don't have it any more */ |
726 | 726 | mem_pools->memory_allocated -= cur_block->size; |
727 | | mem_pools->memory_used -= |
728 | | cur_block->size - cur_block->free - cur_block->freed; |
| 727 | mem_pools->memory_used -= cur_block->size - cur_block->free; |
729 | 728 | |
730 | 729 | /* We know the pool body and pool header are a single chunk, so |
731 | 730 | * this is enough to get rid of 'em both */ |
diff --git a/src/gc/gc_ms.c b/src/gc/gc_ms.c
index 08b2cce..cc9aac2 100644
a
|
b
|
|
1268 | 1268 | /* Decrease usage */ |
1269 | 1269 | PARROT_ASSERT(Buffer_pool(str)); |
1270 | 1270 | Buffer_pool(str)->freed += old_size; |
1271 | | interp->mem_pools->memory_used -= old_size; |
1272 | 1271 | |
1273 | 1272 | /* copy mem from strstart, *not* bufstart */ |
1274 | 1273 | oldmem = str->strstart; |
diff --git a/src/gc/mark_sweep.c b/src/gc/mark_sweep.c
index 92bbb3c..b6baba6 100644
a
|
b
|
|
32 | 32 | /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ |
33 | 33 | |
34 | 34 | static void free_buffer(SHIM_INTERP, |
35 | | ARGMOD(Memory_Pools *mem_pools), |
| 35 | SHIM(Memory_Pools *mem_pools), |
36 | 36 | ARGMOD(Fixed_Size_Pool *pool), |
37 | 37 | ARGMOD(Buffer *b)) |
38 | | __attribute__nonnull__(2) |
39 | 38 | __attribute__nonnull__(3) |
40 | 39 | __attribute__nonnull__(4) |
41 | | FUNC_MODIFIES(*mem_pools) |
42 | 40 | FUNC_MODIFIES(*pool) |
43 | 41 | FUNC_MODIFIES(*b); |
44 | 42 | |
… |
… |
|
80 | 78 | FUNC_MODIFIES(*mem_pools); |
81 | 79 | |
82 | 80 | #define ASSERT_ARGS_free_buffer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ |
83 | | PARROT_ASSERT_ARG(mem_pools) \ |
84 | | , PARROT_ASSERT_ARG(pool) \ |
| 81 | PARROT_ASSERT_ARG(pool) \ |
85 | 82 | , PARROT_ASSERT_ARG(b)) |
86 | 83 | #define ASSERT_ARGS_free_pmc_in_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ |
87 | 84 | PARROT_ASSERT_ARG(interp) \ |
… |
… |
|
668 | 665 | |
669 | 666 | static void |
670 | 667 | free_buffer(SHIM_INTERP, |
671 | | ARGMOD(Memory_Pools *mem_pools), |
| 668 | SHIM(Memory_Pools *mem_pools), |
672 | 669 | ARGMOD(Fixed_Size_Pool *pool), |
673 | 670 | ARGMOD(Buffer *b)) |
674 | 671 | { |
… |
… |
|
693 | 690 | |
694 | 691 | /* We can have shared buffers. Don't count them (yet) */ |
695 | 692 | if (!(*buffer_flags & Buffer_shared_FLAG)) { |
696 | | size_t size = ALIGNED_STRING_SIZE(Buffer_buflen(b)); |
697 | | block->freed += size; |
698 | | mem_pools->memory_used -= size; |
| 693 | block->freed += ALIGNED_STRING_SIZE(Buffer_buflen(b)); |
699 | 694 | } |
700 | 695 | |
701 | 696 | } |