various progress

This commit is contained in:
ed
2025-02-05 10:37:25 -05:00
parent e19dd6b58c
commit c1d24b3a07
45 changed files with 997 additions and 3604 deletions
+7 -6
View File
@@ -1,4 +1,4 @@
#ifdef MD_INTELLISENSE_DIRECTIVES
#ifdef INTELLISENSE_DIRECTIVES
# pragma once
# include "context_cracking.h"
# include "linkage.h"
@@ -22,19 +22,20 @@
#define MD__HAS_ZERO( x ) ( ( ( x ) - MD__ONES ) & ~( x ) & MD__HIGHS )
#if MD_COMPILER_MSVC || (MD_COMPILER_CLANG && MD_OS_WINDOWS)
# pragma section(".rdata$", read)
# define read_only __declspec(allocate(".rdata$"))
# pragma section(".rdata$", read)
# define read_only __declspec(allocate(".rdata$"))
#elif (MD_COMPILER_CLANG && MD_OS_LINUX)
# define read_only __attribute__((section(".rodata")))
# define read_only __attribute__((section(".rodata")))
#else
// NOTE(rjf): I don't know of a useful way to do this in GCC land.
// __attribute__((section(".rodata"))) looked promising, but it introduces a
// strange warning about malformed section attributes, and it doesn't look
// like writing to that section reliably produces access violations, strangely
// enough. (It does on Clang)
# define read_only
# define read_only
#endif
typedef U32 AllocType;
enum AllocType enum_underlying(U32)
{
EAllocType_ALLOC,
@@ -42,10 +43,10 @@ enum AllocType enum_underlying(U32)
EAllocType_FREE_ALL,
EAllocType_RESIZE,
};
typedef U32 AllocType;
typedef void*(AllocatorProc)( void* allocator_data, AllocType type, SSIZE size, SSIZE alignment, void* old_memory, SSIZE old_size, U64 flags );
typedef struct AllocatorInfo;
struct AllocatorInfo
{
AllocatorProc* proc;