Rename mem utils
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
#include "../../../common/misc/misc_utils.h"
|
||||
#include <stddef.h>
|
||||
|
||||
void *wapp_mem_util_align_forward(void *ptr, u64 alignment) {
|
||||
void *wpMemUtilAlignForward(void *ptr, u64 alignment) {
|
||||
wpDebugAssert(ptr != NULL, "`ptr` should not be NULL");
|
||||
wpRuntimeAssert(wpMiscUtilsIsPowerOfTwo(alignment), "`alignment` value is not a power of two");
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
BEGIN_C_LINKAGE
|
||||
#endif // !WP_PLATFORM_CPP
|
||||
|
||||
void *wapp_mem_util_align_forward(void *ptr, u64 alignment);
|
||||
void *wpMemUtilAlignForward(void *ptr, u64 alignment);
|
||||
|
||||
#ifdef WP_PLATFORM_CPP
|
||||
END_C_LINKAGE
|
||||
|
||||
@@ -93,7 +93,7 @@ void *wapp_mem_arena_alloc_aligned(Arena *arena, u64 size, u64 alignment) {
|
||||
|
||||
u8 *alloc_start = arena->offset;
|
||||
|
||||
u8 *output = wapp_mem_util_align_forward((void *)alloc_start, alignment);
|
||||
u8 *output = wpMemUtilAlignForward((void *)alloc_start, alignment);
|
||||
if (output + size >= arena->buf + arena->capacity) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user