mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-12 00:30:20 +02:00
Fix bug ensuring zeroed memory
If the granule size is bigger than a pointer, we were leaving the first granule uncleared.
This commit is contained in:
parent
7fc2fdbbf7
commit
83bf1d8cf3
1 changed files with 1 additions and 1 deletions
|
@ -666,7 +666,7 @@ static int sweep(struct mark_space *space,
|
|||
size_t free_granules = next_mark(mark, limit_granules);
|
||||
if (free_granules) {
|
||||
size_t free_bytes = free_granules * GRANULE_SIZE;
|
||||
clear_memory(sweep + GRANULE_SIZE, free_bytes - GRANULE_SIZE);
|
||||
clear_memory(sweep + sizeof(uintptr_t), free_bytes - sizeof(uintptr_t));
|
||||
reclaim(space, small_objects, small_object_granules, (void*)sweep,
|
||||
free_granules);
|
||||
sweep += free_bytes;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue