diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-05-28 15:56:24 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-05-28 15:56:24 +0300 |
commit | d59e15bdb96bd24dadaed39bba25fcb0c0bbf8f4 (patch) | |
tree | f371cddd0134ed01964b7b3e051d890b2cec20f1 /mysys | |
parent | 88157247fc5920ef77cfa96aebd33460d86b3905 (diff) | |
parent | 8358c6f03edb941be488f009c2bd0eb9df47e8c5 (diff) | |
download | mariadb-git-d59e15bdb96bd24dadaed39bba25fcb0c0bbf8f4.tar.gz |
Merge 10.1 into 10.2
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_alloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c index 701adbf4d14..3b614cb4c15 100644 --- a/mysys/my_alloc.c +++ b/mysys/my_alloc.c @@ -217,7 +217,7 @@ void *alloc_root(MEM_ROOT *mem_root, size_t length) DBUG_SET("-d,simulate_out_of_memory"); DBUG_RETURN((void*) 0); /* purecov: inspected */ }); - length= ALIGN_SIZE(length); + length= ALIGN_SIZE(length) + REDZONE_SIZE; if ((*(prev= &mem_root->free)) != NULL) { if ((*prev)->left < length && @@ -265,6 +265,7 @@ void *alloc_root(MEM_ROOT *mem_root, size_t length) mem_root->used= next; mem_root->first_block_usage= 0; } + point+= REDZONE_SIZE; TRASH_ALLOC(point, original_length); DBUG_PRINT("exit",("ptr: %p", point)); DBUG_RETURN((void*) point); |