From 79ea8dda648c3c702fc894ab04820df2c2090ce9 Mon Sep 17 00:00:00 2001 From: Mineplay Date: Sat, 19 Apr 2025 06:38:01 -0500 Subject: [PATCH] feat(allocator): added calloc function --- Include/Hallocy/Core/Allocator.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Include/Hallocy/Core/Allocator.h b/Include/Hallocy/Core/Allocator.h index 04ff2e5..e3ab9c0 100644 --- a/Include/Hallocy/Core/Allocator.h +++ b/Include/Hallocy/Core/Allocator.h @@ -31,6 +31,7 @@ void *hallocy_allocate(size_t size, bool zero_memory); static inline void *hallocy_malloc(size_t size) { return hallocy_allocate(size, false); } +static inline void *hallocy_calloc(size_t size, size_t count) { return hallocy_allocate(size * count, true); } HallocyError hallocy_free(void *pointer); #endif \ No newline at end of file