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