diff options
author | unknown <msvensson@neptunus.(none)> | 2005-09-05 12:09:35 +0200 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2005-09-05 12:09:35 +0200 |
commit | a0ea35da309df6c82ea91784f89e53cda0a153b1 (patch) | |
tree | e155ce6e7acf83ad59dcffb38bf9440c09a97f2e /mysys | |
parent | 7a0f593dac959f2f243f4157a7c763c152e10dc6 (diff) | |
download | mariadb-git-a0ea35da309df6c82ea91784f89e53cda0a153b1.tar.gz |
BUG#12983
TRASH macro confliciting with TRASH in my_sys.h
mysys/my_alloc.c:
Rename TRASH to TRASH_MEM and use the TRASH macro from my_sys.h
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_alloc.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c index 5a78eb17c96..fd5a4908572 100644 --- a/mysys/my_alloc.c +++ b/mysys/my_alloc.c @@ -221,11 +221,7 @@ gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size) #endif } -#ifdef SAFEMALLOC -#define TRASH(X) bfill(((char*)(X) + ((X)->size-(X)->left)), (X)->left, 0xa5) -#else -#define TRASH /* no-op */ -#endif +#define TRASH_MEM(X) TRASH(((char*)(X) + ((X)->size-(X)->left)), (X)->left) /* Mark all data in blocks free for reusage */ @@ -239,7 +235,7 @@ static inline void mark_blocks_free(MEM_ROOT* root) for (next= root->free; next; next= *(last= &next->next)) { next->left= next->size - ALIGN_SIZE(sizeof(USED_MEM)); - TRASH(next); + TRASH_MEM(next); } /* Combine the free and the used list */ @@ -249,7 +245,7 @@ static inline void mark_blocks_free(MEM_ROOT* root) for (; next; next= next->next) { next->left= next->size - ALIGN_SIZE(sizeof(USED_MEM)); - TRASH(next); + TRASH_MEM(next); } /* Now everything is set; Indicate that nothing is used anymore */ @@ -310,7 +306,7 @@ void free_root(MEM_ROOT *root, myf MyFlags) { root->free=root->pre_alloc; root->free->left=root->pre_alloc->size-ALIGN_SIZE(sizeof(USED_MEM)); - TRASH(root->pre_alloc); + TRASH_MEM(root->pre_alloc); root->free->next=0; } root->block_num= 4; |