Hacker News new | ask | show | jobs
by netheril96 3287 days ago
> dynamic strings would be isolated to their own pool to avoid fragmenting the heap

Strings have arbitrary sizes. How does pooling them together reduce fragmentation? Do they always come and go in groups?

1 comments

I think it reduces fragmentation in the other pools, not the string pool.
Bingo. This helps restrict the fragmentation from dynamic strings to one pool of memory, allowing the others to remain nicely packed, aligned, etc (whatever your ideal for them is).