> Will 'free' return the memory Immediately to the OS ?
It depends on how your free() is implemented.
Most libc's use a complex algorithm to do memory manangement,
in order to get the speed, maybe they won't give the memory
to OS immediately after free().
The C std just can guarantee that after your free(), that
memory block can be used for further malloc().
- ► 2016 (22)
- ► 2015 (37)
- ▼ 2008 (29)