diff options
author | p0358 <p0358@users.noreply.github.com> | 2021-12-31 22:25:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-31 22:25:40 +0100 |
commit | dcba96bcc4b02639e859b0dcdc863391cb54684f (patch) | |
tree | 99d129460365774ae011d83b3765e7d9388c44a7 /NorthstarDedicatedTest/memalloc.h | |
parent | 4f7c3d02943a38941b79a638c5607b2b7f668956 (diff) | |
parent | d658c0c8374f8491e062fabe031f79185169c414 (diff) | |
download | NorthstarLauncher-dcba96bcc4b02639e859b0dcdc863391cb54684f.tar.gz NorthstarLauncher-dcba96bcc4b02639e859b0dcdc863391cb54684f.zip |
Merge pull request #1 from geniiii/p0358-refactor-fixes
Fixes, removal of fallback linear allocator
Diffstat (limited to 'NorthstarDedicatedTest/memalloc.h')
-rw-r--r-- | NorthstarDedicatedTest/memalloc.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/NorthstarDedicatedTest/memalloc.h b/NorthstarDedicatedTest/memalloc.h index d9277694..b98fe3c8 100644 --- a/NorthstarDedicatedTest/memalloc.h +++ b/NorthstarDedicatedTest/memalloc.h @@ -3,16 +3,16 @@ #include "include/rapidjson/document.h" //#include "include/rapidjson/allocators.h" -extern size_t g_iStaticAllocated; - -extern "C" { - char* _strdup_base(const char* src); -} +extern "C" void* _malloc_base(size_t size); +extern "C" void* _calloc_base(size_t const count, size_t const size); +extern "C" void* _realloc_base(void* block, size_t size); +extern "C" void* _recalloc_base(void* const block, size_t const count, size_t const size); +extern "C" void _free_base(void* const block); +extern "C" char* _strdup_base(const char* src); void* operator new(size_t n); void operator delete(void* p); -void* _malloc_base(size_t n); //void* malloc(size_t n); class SourceAllocator { @@ -35,7 +35,7 @@ public: static void Free(void* ptr) { _free_base(ptr); } }; -extern SourceAllocator* g_SourceAllocator; +static SourceAllocator g_SourceAllocator; typedef rapidjson::GenericDocument<rapidjson::UTF8<>, rapidjson::MemoryPoolAllocator<SourceAllocator>, SourceAllocator> rapidjson_document; //typedef rapidjson::GenericDocument<rapidjson::UTF8<>, SourceAllocator, SourceAllocator> rapidjson_document; |