ucl_object_insert_key (top,
ucl_object_fromint (
mem_st.oversized_chunks), "chunks_oversized", 0, false);
+ ucl_object_insert_key (top,
+ ucl_object_fromint (mem_st.fragmented_size), "fragmented", 0, false);
if (do_reset) {
session->ctx->srv->stat->messages_scanned = 0;
}
else {
mem_pool_stat->oversized_chunks++;
+ g_atomic_int_add (&mem_pool_stat->fragmented_size,
+ free);
new = rspamd_mempool_chain_new (
size + pool->elt_len + MEM_ALIGNMENT, pool_type);
}
guint shared_chunks_allocated; /**< shared chunks allocated */
guint chunks_freed; /**< chunks freed */
guint oversized_chunks; /**< oversized chunks */
+ guint fragmented_size; /**< fragmentation size */
} rspamd_mempool_stat_t;