Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Yes. Another possibility, add something with __FILE__ and __LINE__ if there are memory leaks to debug. (Never did that but it should help).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: