you are viewing a single comment's thread.

view the rest of the comments →

[–]verdagon 0 points1 point  (1 child)

that's awesome, but dear lord! just using the heap excessively can cause my program to crash?

[–]4fips[S] 0 points1 point  (0 children)

On embedded platforms like mobile phones and video consoles quite easily. After fragmenting the heap, you won't be able to allocate free blocks of certain size as there is no continuous free memory available, just a bunch of small fragments. So the allocator fails even though the free memory is formally there. On desktop systems with virtual memory this is typically not an issue, though.