I have a program which mallocs and later frees a lot of memory ...

Q

I have a program which mallocs and later frees a lot of memory, but I can see from the operating system that memory usage doesn't actually go back down.

✍: Guest

A

Most implementations of malloc/free do not return freed memory to the operating system, but merely make it available for future malloc calls within the same program.

2016-03-28, 375👍, 0💬