diff options
Diffstat (limited to 'src/memory.h')
-rw-r--r-- | src/memory.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/memory.h b/src/memory.h index f5dbe6f453..324670115b 100644 --- a/src/memory.h +++ b/src/memory.h @@ -2,6 +2,8 @@ #define NEOVIM_MEMORY_H #include "func_attr.h" +#include "types.h" +#include "vim.h" char_u *alloc(unsigned size) FUNC_ATTR_MALLOC FUNC_ATTR_ALLOC_SIZE(1); char_u *alloc_clear(unsigned size) FUNC_ATTR_MALLOC FUNC_ATTR_ALLOC_SIZE(1); @@ -19,6 +21,15 @@ char_u *lalloc_clear(long_u size, int message) FUNC_ATTR_MALLOC FUNC_ATTR_ALLOC_ void *xmalloc(size_t size) FUNC_ATTR_MALLOC FUNC_ATTR_ALLOC_SIZE(1) FUNC_ATTR_NONNULL_RET; +/// calloc() wrapper +/// +/// @see {xmalloc} +/// @param count +/// @param size +/// @return pointer to allocated space. Never NULL +void *xcalloc(size_t count, size_t size) + FUNC_ATTR_MALLOC FUNC_ATTR_ALLOC_SIZE_PROD(1, 2) FUNC_ATTR_NONNULL_RET; + /// realloc() wrapper /// /// @see {xmalloc} |