is minimal and it helps debugging.
uns elt_size;
uns chunk_size;
uns elts_per_chunk;
uns elt_size;
uns chunk_size;
uns elts_per_chunk;
+ uns num_allocated; // Just for debugging
};
struct eltpool_chunk {
};
struct eltpool_chunk {
static inline void *
ep_alloc(struct eltpool *pool)
{
static inline void *
ep_alloc(struct eltpool *pool)
{
#ifdef CONFIG_FAKE_ELTPOOL
return xmalloc(pool->elt_size);
#else
#ifdef CONFIG_FAKE_ELTPOOL
return xmalloc(pool->elt_size);
#else
static inline void
ep_free(struct eltpool *pool, void *p)
{
static inline void
ep_free(struct eltpool *pool, void *p)
{
#ifdef CONFIG_FAKE_ELTPOOL
(void) pool;
xfree(p);
#ifdef CONFIG_FAKE_ELTPOOL
(void) pool;
xfree(p);