Browse Source

[Minor] Add another helper for mempool typed allocations

tags/3.0
Vsevolod Stakhov 3 years ago
parent
commit
c9a5719fb6
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      src/libutil/mem_pool.h

+ 2
- 0
src/libutil/mem_pool.h View File

@@ -155,6 +155,8 @@ void *rspamd_mempool_alloc_ (rspamd_mempool_t *pool, gsize size, const gchar *lo
rspamd_mempool_alloc_((pool), (size), (G_STRLOC))
#define rspamd_mempool_alloc_type(pool, type) \
(type *)(rspamd_mempool_alloc_((pool), sizeof(type), (G_STRLOC)))
#define rspamd_mempool_alloc_buffer(pool, buflen) \
(char *)(rspamd_mempool_alloc_((pool), sizeof(char) * (buflen), (G_STRLOC)))
/**
* Notify external memory usage for memory pool
* @param pool

Loading…
Cancel
Save