Tamely / SaturnSwapper

The most advanced Unreal Engine modding tool to this date.
https://discord.gg/saturnswapper
72 stars 31 forks source link

Changes #73

Closed FinDotnet closed 1 year ago

FinDotnet commented 1 year ago

I have made several improvements to the code, including the addition of conditional statements such as if statements, and iterative structures such as for and while loops. I have also resolved numerous compiler issues and rebuilt the runtime.

The runtime's memory is divided into three sections: the Stack, the Heap, and the Static Heap.

The Stack is a contiguous block of memory that functions like any other stack. It contains the stack frames of methods, with each method having its own stack frame that holds its variables and evaluation stack.

The Heap is similar to the Stack in that it is also a contiguous block of memory. However, it is much larger than the Stack, which has a default size of 1 MB, while the Heap has a size of 50 MB.

The Static Heap is a variant of the Heap that contains only static fields.

All three memory sections are managed by the Runtime. Objects are cleaned up when they are considered dead, meaning they are not rooted in the program and do not belong to the Stack, Heap, or Static Heap.

Memory allocation and deallocation for these sections are handled using P/Invoke::VirtualAlloc and P/Invoke::VirtualFree, respectively.