mempool-datastack.c revision e90d9eaa3ef3486c2da76b86ffd83b779f45d9cd
/* Copyright (c) 2002-2016 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "mempool.h"
static struct pool_vfuncs static_data_stack_pool_vfuncs = {
};
static const struct pool static_data_stack_pool = {
.alloconly_pool = TRUE,
};
struct datastack_pool {
int refcount;
unsigned int data_stack_frame;
};
pool_t pool_datastack_create(void)
{
struct datastack_pool *dpool;
}
{
return "data stack";
}
{
i_panic("pool_data_stack_ref(): stack frame changed");
}
{
i_panic("pool_data_stack_unref(): stack frame changed");
}
{
i_panic("pool_data_stack_malloc(): stack frame changed");
}
{
i_panic("pool_data_stack_free(): stack frame changed");
}
{
void *new_mem;
/* @UNSAFE */
i_panic("pool_data_stack_realloc(): stack frame changed");
return mem;
}
return mem;
}
{
}
static size_t
{
return t_get_bytes_available();
}