diff options
Diffstat (limited to 'runtime/debug.c')
-rw-r--r-- | runtime/debug.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/debug.c b/runtime/debug.c index 476f8bf7..fa57a8d8 100644 --- a/runtime/debug.c +++ b/runtime/debug.c @@ -1254,6 +1254,20 @@ dbgPrintNameIsInList(const uchar *pName, dbgPrintName_t *pRoot) } +/* this is a special version of malloc that fills the alloced memory with + * HIGHVALUE, as this helps to identify bugs. -- rgerhards, 2009-10-22 + */ +void * +dbgmalloc(size_t size) +{ + void *pRet; + pRet = malloc(size); + if(pRet != NULL) + memset(pRet, 0xff, size); + return pRet; +} + + /* read in the runtime options * rgerhards, 2008-02-28 */ |