Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sure, but also remember that while vectors are better at locality, both vectors and lists can trash the heap; both are making variable sized requests on demand from the allocator.


Every time I've had to deal with fragmentation, it was due to a small number of large objects. Never large numbers of small objects. ymmv.


Which is probably thanks to a good memory allocator.


Very definitely not my experience.


Didn't mean to imply it was always the case. Just a counterpoint to the conventional wisdom that fragmentation is only a problem with lots of tiny objects.


Sorry, we always sound snippy on message boards. I'm not That Guy in real life. Wait no I totally am.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: