mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge 10.6 into 10.8
This commit is contained in:
@@ -28,6 +28,11 @@
|
||||
#undef EXTRA_DEBUG
|
||||
#define EXTRA_DEBUG
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
/* Put a protected barrier after every element when using multi_alloc_root() */
|
||||
#define ALLOC_BARRIER
|
||||
#endif
|
||||
|
||||
/* data packed in MEM_ROOT -> min_malloc */
|
||||
|
||||
/* Don't allocate too small blocks */
|
||||
@@ -396,6 +401,9 @@ void *multi_alloc_root(MEM_ROOT *root, ...)
|
||||
{
|
||||
length= va_arg(args, uint);
|
||||
tot_length+= ALIGN_SIZE(length);
|
||||
#ifdef ALLOC_BARRIER
|
||||
tot_length+= ALIGN_SIZE(1);
|
||||
#endif
|
||||
}
|
||||
va_end(args);
|
||||
|
||||
@@ -409,6 +417,10 @@ void *multi_alloc_root(MEM_ROOT *root, ...)
|
||||
*ptr= res;
|
||||
length= va_arg(args, uint);
|
||||
res+= ALIGN_SIZE(length);
|
||||
#ifdef ALLOC_BARRIER
|
||||
TRASH_FREE(res, ALIGN_SIZE(1));
|
||||
res+= ALIGN_SIZE(1);
|
||||
#endif
|
||||
}
|
||||
va_end(args);
|
||||
DBUG_RETURN((void*) start);
|
||||
|
Reference in New Issue
Block a user