by badsectoracula · 9y ago · 0 comments
This is also why Valgrind separates reachable and unreachable memory and only considers unreachable memory as leaks.
In any case, hiding this sort of behavior in a way that sucks down days of debugging time on the part of one expert programmer after another, after another, after another, is terrible engineering.
On iOS and android you are expected to free whatever unused memory you can when you are notified of a low memory situation.
So it's not a traditional leak but because memory usage would continue to grow it causes the long lived process to choke itself and die.
[1] And you cannot have more than one heap without mmap. Without mmap, you only have sbrk = the one heap. On UNIX and those that pretend to be, anyway.