medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 5523bbde434dbdac41c008d17e06d7dd380a454e
parent b8b3016d73ec079d6d1f6ccae33679272e9b3095
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sun Aug 16 13:19:18 +0200

Use pointer size as default MemoryArena alignment

Diffstat:
memory_arena.h | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/memory_arena.h b/memory_arena.h @@ -17,7 +17,7 @@ struct MemoryArenaCheckpoint { }; void memarena_init( MemoryArena * const arena, u8 * const memory, const size_t size ); -u8 * memarena_push_size( MemoryArena * const arena, const size_t size, const size_t alignment = 4 ); +u8 * memarena_push_size( MemoryArena * const arena, const size_t size, const size_t alignment = sizeof( void * ) ); #define memarena_push_type( arena, type ) ( ( type * ) memarena_push_size( arena, sizeof( type ), sizeof( type ) ) ) void memarena_clear( MemoryArena * const arena ); MemoryArenaCheckpoint memarena_checkpoint( MemoryArena * const arena );