snazzy-d / sdc

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

Resize-in-place for large allocs. (Shrink-only) #289

Closed dsm9000 closed 1 year ago

dsm9000 commented 1 year ago

In re: https://github.com/snazzy-d/sdc/issues/265 . realloc() now resizes in place when possible, using appropriate size class. Currently only supports realloc() downwards.

deadalnix commented 1 year ago

What about we extract the changes in hpd and the changes in emap in their own PR so we can merge them right away, and we reduce the noise for the rest of it, for which there are still a few open questions? No need to block these refactoring to go in.

deadalnix commented 1 year ago

This is looking good, but there is probably some simplification in argument passing in the various functions in the arena.