From 2695f2fe81402139095af7f94058d9e4d650fc9f Mon Sep 17 00:00:00 2001 From: Force67 Date: Tue, 28 Dec 2021 14:35:24 +0100 Subject: [PATCH] feat: rip 'allocator' --- .../immersive_launcher/memory/RipAllocatorPool.cpp | 14 ++++++++++++++ Code/immersive_launcher/memory/RipAllocatorPool.h | 0 2 files changed, 14 insertions(+) create mode 100644 Code/immersive_launcher/memory/RipAllocatorPool.cpp create mode 100644 Code/immersive_launcher/memory/RipAllocatorPool.h diff --git a/Code/immersive_launcher/memory/RipAllocatorPool.cpp b/Code/immersive_launcher/memory/RipAllocatorPool.cpp new file mode 100644 index 000000000..87dcfc2b4 --- /dev/null +++ b/Code/immersive_launcher/memory/RipAllocatorPool.cpp @@ -0,0 +1,14 @@ + +// Deliberately in no namespace... + +#include + +extern char highrip[]; +static char* globalPointer = &highrip[0]; + +void* RipAllocateN(size_t blockLength) +{ + void *p = static_cast(globalPointer); + globalPointer += blockLength; + return p; +} diff --git a/Code/immersive_launcher/memory/RipAllocatorPool.h b/Code/immersive_launcher/memory/RipAllocatorPool.h new file mode 100644 index 000000000..e69de29bb