mempool-system.c revision 45312f52ff3a3d4c137447be4c7556500c2f8bf2
/* Copyright (c) 2002-2009 Dovecot authors, see the included COPYING file */
/* @UNSAFE: whole file */
#include "lib.h"
#include "mempool.h"
#include <stdlib.h>
#ifdef HAVE_MALLOC_H
# include <malloc.h>
#endif
#ifdef HAVE_MALLOC_NP_H
# include <malloc_np.h> /* for malloc_usable_size() with FreeBSD */
#endif
#ifdef HAVE_GC_GC_H
# include <gc.h>
#endif
static struct pool_vfuncs static_system_pool_vfuncs = {
};
struct pool static_system_pool = {
};
{
return "system";
}
{
}
{
}
{
void *mem;
#ifndef USE_GC
#else
#endif
"): Out of memory", size);
}
return mem;
}
void *mem ATTR_UNUSED)
{
#ifndef USE_GC
#endif
}
{
#if !defined(USE_GC) && defined(HAVE_MALLOC_USABLE_SIZE)
#endif
#ifndef USE_GC
#else
#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;
}