seize icon indicating copy to clipboard operation
seize copied to clipboard

Reduce memory usage

Open ibraheemdev opened this issue 3 years ago • 3 comments

See https://github.com/jonhoo/flurry/issues/80#issuecomment-1082309088.

ibraheemdev avatar Mar 29 '22 21:03 ibraheemdev

https://github.com/ibraheemdev/seize/pull/19 should address the issue. We still require an extra two words of memory per object, but getting rid of those is more difficult. We would have to make links optional but verify that they are used when epoch tracking is enabled. That would allow moving the reservation list pointers into the batch allocation for each node, reducing the metadata to one word per object.

ibraheemdev avatar Apr 16 '24 04:04 ibraheemdev

#24 further reduces the overhead to one word. The final improvement that could be made is making epoch tracking manual by making Link/Epoch an argument to retire and moving reservation lists into the batch allocation, allowing nodes to be entirely optional.

ibraheemdev avatar Apr 16 '24 18:04 ibraheemdev

When batch sizes are large we can also try to estimate the number of entries that will be used in reservation lists and keep them separately, avoiding extra memory usage for the rest of the batch.

ibraheemdev avatar Apr 16 '24 18:04 ibraheemdev