Commit dde8ab03 authored by Barry Hayes's avatar Barry Hayes Committed by Jean-Baptiste Queru
Browse files

Change strategy for freeing objects in the sweep.

dlfree() in dlmalloc.c is fairly expensive. It checks the previous and
next block to see if the curent block can be merged into one of the
free blocks, and if it does merge, that involves manipulating the
internal free lists.

The sweep phase of the GC is already visiting free objects in address
order, and has a list of objects to be freed. The new strategy is:

Loop over the list of objects to be freed, merging when possible, and
only calling free() when a either the list has run out or a
non-adjacent free object is found.
parent 1d24288d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment