snazzy-d / sdc

The Snazzy D Compiler
MIT License
249 stars 55 forks source link

Zero slabs that are freed that contain pointers, so when they are #395

Closed schveiguy closed 1 week ago

schveiguy commented 2 weeks ago

allocated next time, they are already zero.

This isn't as performant as I would like it to be. I can't think of a good way to run both finalization and zeroing in the same pass.

I also think there is an opportunity to memset batches of slabs, which might happen if you for instance free an entire graph of nodes at once. I might be able to get something like that working.

schveiguy commented 1 week ago

The first step here is to split things in 2

This is done, this PR is now just the tcache change. Will open a second PR with the collect changes.