snazzy-d / sdc

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

sdalloc - Why does this function accept a range of pointers? #367

Closed schveiguy closed 1 month ago

schveiguy commented 3 months ago

Looking through the GC code, and I'm puzzled why this accepts an array of pointers, and then only uses one of them:

https://github.com/snazzy-d/sdc/blob/9fe482363511ae7684ae321e33e52bd9643fad16/sdlib/d/gc/arena.d#L106

The buffer parameter is passed to the batchAllocate function of the bin, but only one pointer is passed, should the whole thing be passed?

deadalnix commented 1 month ago

It was a stopgap state. This is not the case anymore.