16 #include "mysys_priv.h"
34 void* my_multi_malloc(myf myFlags, ...)
37 char **ptr,*start,*res;
38 size_t tot_length,length;
39 DBUG_ENTER(
"my_multi_malloc");
41 va_start(args,myFlags);
43 while ((ptr=va_arg(args,
char **)))
45 length=va_arg(args,uint);
46 tot_length+=ALIGN_SIZE(length);
50 if (!(start=(
char *) my_malloc(tot_length,myFlags)))
53 va_start(args,myFlags);
55 while ((ptr=va_arg(args,
char **)))
58 length=va_arg(args,uint);
59 res+=ALIGN_SIZE(length);
62 DBUG_RETURN((
void*) start);