3 ms·
No, because the OS isn't reclaiming the memory specifically; and this only works with overcommit and/or swap. The memory isn't actually being reclaimed, it's be
by ecnahc515 8y ago
No, because the OS isn't reclaiming the memory specifically; and this only works with overcommit and/or swap. The memory isn't actually being reclaimed, it's being paged out. If your application actually begins to use the memory but never uses the data again (eg; can't reference it) it will continue to eat memory until the OOM killer kicks in or the system crashes.
- eximius 8y agoWell, unless your program is particularly long lived, it will be reclaimed. There are many tools that could reasonably forego `free` for their entire runtimes.
- ecnahc515 8y agoI presume we're talking about long running programs otherwise the conversation isn't really super useful since for any program, short or long memory is reclaimed when a program exits (well, at least on any modern OS).