diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-05-25 10:42:21 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-05-27 15:05:21 +0100 |
commit | c9a5719fb6187b59229465be631972ace9f32896 (patch) | |
tree | b6da42192fbb3d78eed6ade63e0b4b37262a5bf9 /src/libutil | |
parent | b8b418eddc2eb371570e7c4099084255804d0484 (diff) | |
download | rspamd-c9a5719fb6187b59229465be631972ace9f32896.tar.gz rspamd-c9a5719fb6187b59229465be631972ace9f32896.zip |
[Minor] Add another helper for mempool typed allocations
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/mem_pool.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libutil/mem_pool.h b/src/libutil/mem_pool.h index eea1c6358..d4488ac55 100644 --- a/src/libutil/mem_pool.h +++ b/src/libutil/mem_pool.h @@ -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 |