Jump to content
Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Posted 01 September 2012 - 08:45 AM
Posted 01 September 2012 - 09:08 AM
The simplest option is to enable Page Heap Mode but it does require plenty of spare address space (link with /LARGEADDRESSAWARE if it's a 32-bit program to double available address space when run on 64-bit Windows).
You could also try http://www.drmemory.org/ but it's not so easy to use.
Posted 01 September 2012 - 09:42 AM
Page Heap puts each allocation on its own 4-KB page, with the allocated memory aligned to the end of the page. Therefore if you overrun the buffer you will touch the next page. Page Heap ensures that the next page will be unmapped memory so you get a guaranteed access violation at the exact moment that you overrun the buffer.
Edited by Hodgman, 01 September 2012 - 09:44 AM.
Posted 01 September 2012 - 10:03 AM
Edited by Ripiz, 01 September 2012 - 10:03 AM.
Posted 01 September 2012 - 10:45 AM
Posted 02 September 2012 - 12:59 PM
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.