changes based off of metadesk genc_c11

This commit is contained in:
2025-02-11 18:59:09 -05:00
parent 878bc4c8ae
commit 75b1d42cca
10 changed files with 102 additions and 39 deletions

View File

@@ -198,21 +198,16 @@
#ifndef forceinline
# if GEN_COMPILER_MSVC
# define forceinline __forceinline
# define neverinline __declspec( noinline )
# elif GEN_COMPILER_GCC
# define forceinline inline __attribute__((__always_inline__))
# define neverinline __attribute__( ( __noinline__ ) )
# elif GEN_COMPILER_CLANG
# if __has_attribute(__always_inline__)
# define forceinline inline __attribute__((__always_inline__))
# define neverinline __attribute__( ( __noinline__ ) )
# else
# define forceinline
# define neverinline
# endif
# else
# define forceinline
# define neverinline
# endif
#endif

View File

@@ -138,7 +138,7 @@ constexpr AllocatorInfo heap( void ) { AllocatorInfo allocator = { heap_allocato
#define malloc( sz ) alloc( heap(), sz )
//! Helper to free memory allocated by heap allocator.
#define mfree( ptr ) free( heap(), ptr )
#define mfree( ptr ) allocator_free( heap(), ptr )
struct VirtualMemory
{