3 ms·
> It also uncovered a "bug" (performance weakness?) in v8 that they were able to fix so less CFG blocks were allocated. They implemented a freelist, it's a com
by masklinn 8y ago
> It also uncovered a "bug" (performance weakness?) in v8 that they were able to fix so less CFG blocks were allocated.
They implemented a freelist, it's a common workaround for problematic allocators, but has its own issues (https://www.tedunangst.com/flak/post/analysis-of-openssl-freelist-reuse https://www.tedunangst.com/flak/post/analysis-of-openssl-fre...)
- brucedawson 8y agoNormally a freelist is a tradeoff between memory and speed, but in this case there is essentially no tradeoff. If you look at the fix you will see that we don't maintain a freelist of memory in any traditional sense. We just retain a freelist of addresses. These addresses are then used as hints for where to allocate future CodeRange objects. If that address is gone, we'll go somewhere else. Because the memory is fully freed and reallocated this also avoids security concerns.