mirror of
https://github.com/Ed94/metadesk.git
synced 2026-07-23 07:57:51 +00:00
various progress
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user