safemalloc always resets the free'd memory, not only when PEDANTIC_SAFEMALLOC

This commit is contained in:
unknown 2004-07-26 21:33:42 +02:00
parent 062ac038df
commit b66a13eeb8
2 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ class Field
public:
static void *operator new(size_t size) {return (void*) sql_alloc((uint) size); }
static void operator delete(void *ptr_arg, size_t size) {
#ifdef PEDANTIC_SAFEMALLOC
#ifdef SAFEMALLOC
bfill(ptr_arg, size, 0x8F);
#endif
}

View File

@ -19,9 +19,9 @@
#pragma interface /* gcc class implementation */
#endif
/* mysql standard class memoryallocator */
/* mysql standard class memory allocator */
#ifdef PEDANTIC_SAFEMALLOC
#ifdef SAFEMALLOC
#define TRASH(XX,YY) bfill((XX), (YY), 0x8F)
#else
#define TRASH(XX,YY) /* no-op */