I'm working on a PostScript interpreter in C#. PostScript has memory management. It has virtual memory (VM). It also has objects. Two types of objects: simple and composite objects. Composite objects consist of other objects itself.
VM is the storage in which the values of composite objects reside. They can either be in local or global VM.
Windows itself doesn't have a concept anymore of local and global VM (they point to the same) and C# is doing its own memory management, so might get too complex to 'hack' C# and adding interop/C/C++ code.
That is why I'm going to need to 'simulate' the memory allocation/management in C# by creating an own structure of classes etc...
And the question is simple: how to start with creating a basic simple memory allocation structure in C# ?
Is there a scheme or overview how this should look like in its very basic form? Should I create an own Heap structure and create two instances (one for local and one for global) and create an own "pointer" struct or class?
The goal is to implement the memory management/allocation in C# for that interpreter.
Looking forward to learn more from your answers and examples.