Hacker News new | past | comments | ask | show | jobs | submit login

... and both malloc() and free() need to maintain (update) their own data structures, which in many implementations (don't know about the current glibc one) are stored interspersed with the data. Walking a hash table and calling free() on each and every item, even if it doesn't seem so, actually dirties a large number of memory pages (which could be truly randomly scattered because it is a hash table), which then need to be re-written into the swap space on swap-out.



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

Search: