Skip to content

HeapAlloc is not ideal for high image base addresses

Currently the RTS's PE linker uses HeapAlloc to allocate memory for sections that it loads. However, HeapAlloc likes to give you memory at the low end of the address space, which is not ideal now that the native toolchain likes to rather place the image base in high memory.

Tamar says we have two options to fix this:

it looks like the user side HeapAlloc doesn't allow you to specify a Base address. so we can either switch to the kernel-user function RtlCreateHeap or we need to rewrite the logic using VirtualAlloc

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information