Download

Giving Unreal Pre-Allocated Memory?

Hey everyone, I’ve been looking into this for a bit and I can’t seem to find anything concrete. I’m aware that UE4 has its own memory management system, and allows standard C++ memory management found here in the wiki:
Memory Management

Is there any way I would be able to make a memory management system that allocates just a block of memory to use for the application? Is there anyway to pre-allocate a large block of memory for the Unreal memory manager?

As an example, I give my application 1GB of memory with which to use. When it tries allocating beyond that the system errors saying “not enough memory allocated”. Conversely, I can watch the memory usage throughout the lifetime of the application, and reduce the allocation if necessary.

If at all possible I like to reduce fragmentation on software because it makes inevitable memory leaks much easier to pin down and helps with other systems looking for a block of memory while the application is running. I can’t seem to find any information on this, other than the UE4 memory management tries to reduce fragmentation.