Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix small chunk finaliser premature re-use bug
Prior to this commit, if a small chunk was partially used after GC and had finalisers to be run for the freed slots, the execution of the finaliser could end up reusing the slots for which finalisers were being run. If this occurred, it would lead to unpredictable results (a segfault in my case). This commit changes the order of operations to ensure that all the finalisers are run prior to the chunk being added back to the available list ensuring that the execution of the finaliser cannot allocate slots that are still to be finalised.
- Loading branch information