Hacker News new | ask | show | jobs
by ken 2311 days ago
Are you taking into account memory fragmentation? Or the internal malloc data structures? If your record were just 1 byte more, it could easily double the total actual memory usage.

Memory usage is discrete, not continuous. It's not as simple as calculating the safety factor on a rope.

1 comments

If you don't free, malloc doesn't need all that overhead