3 ms·
For a slightly improved version, place a sentinel (say a 4 byte magic number) just before and after the allocated segment. Check on FREE_MEMORY if they're still
by jacquesm 7y ago
For a slightly improved version, place a sentinel (say a 4 byte magic number) just before and after the allocated segment. Check on FREE_MEMORY if they're still there. Not perfect but pretty good as an early warning system.
- jstimpfle 7y agoYes. Another possibility, add something with __FILE__ and __LINE__ if there are memory leaks to debug. (Never did that but it should help).