mirror of
https://github.com/decompals/wibo.git
synced 2025-12-17 17:05:29 +00:00
Refactor memory management into wibo::heap
- Removes blockUpper2GB hack; we now start early in the process and reserve all (available) space in the lower 2GB address space, leaving the upper 2GB untouched for host code - All virtual memory operations flow through wibo::heap for bookkeeping - All guest code uses a guest mimalloc area + thread-local heaps reserved in the guest address space
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "common.h"
|
||||
#include "context.h"
|
||||
#include "heap.h"
|
||||
#include "modules.h"
|
||||
|
||||
#include <cstdarg>
|
||||
@@ -125,7 +126,7 @@ RPC_STATUS WINAPI RpcStringBindingComposeW(RPC_WSTR objUuid, RPC_WSTR protSeq, R
|
||||
|
||||
if (stringBinding) {
|
||||
size_t length = encoded.size();
|
||||
auto *buffer = static_cast<char16_t *>(std::malloc((length + 1) * sizeof(char16_t)));
|
||||
auto *buffer = static_cast<char16_t *>(wibo::heap::guestMalloc((length + 1) * sizeof(char16_t)));
|
||||
if (!buffer) {
|
||||
return RPC_S_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user