/* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
/* @UNSAFE: whole file */
#include "lib.h"
#include "safe-memset.h"
#include "mempool.h"
#ifndef HAVE_MALLOC_USABLE_SIZE
/* no extra includes needed */
#elif defined (HAVE_MALLOC_NP_H)
# include <malloc_np.h> /* FreeBSD */
#elif defined (HAVE_MALLOC_H)
# include <malloc.h> /* Linux */
#endif
};
.v = &static_system_pool_vfuncs,
.alloconly_pool = FALSE,
};
{
return "system";
}
{
}
{
}
{
void *mem;
#ifdef DEBUG
#endif
"): Out of memory", size);
}
#ifdef DEBUG
/* we rely on errno not changing. it shouldn't. */
#endif
return mem;
}
{
#ifdef DEBUG
#endif
#if defined(HAVE_MALLOC_USABLE_SIZE) && defined(DEBUG)
#endif
#ifdef DEBUG
/* we rely on errno not changing. it shouldn't. */
#endif
}
{
}
#if defined(HAVE_MALLOC_USABLE_SIZE)
#endif
"): Out of memory", new_size);
}
/* clear new data */
}
return mem;
}
static void ATTR_NORETURN
{
i_panic("pool_system_clear() must not be called");
}
{
return 0;
}