Is there a contained memory enviornment for a Native DLL's memory allocation between Editor and Game modes?

Currently, I am in the process of making a plugin for Unity that relies heavily on a runtime that exist in a native DLL that will handle most of the processing. The Native DLL will make and manage it’s own allocations using a specialized memory allocator. The Native DLL however, does not handle any rendering, so that must go to the Unity’s side.

Going to the Unity side, I would like for this data to then be rendered in a preview port of a custom renderer. As well as allow the Main editor to preview the result after it’s attached to an object. The problem the comes to whether or not Unity is able to make a difference between the Game’s Memory space, and the Editor’s Memory space.

Is the memory allocated by the DLL shared between Unity’s Editor and the Game? Or are the game mode, and the Editor treated as separate pocesses? Thus have their own memory spaces?

No, native plugins are initialized once then remain in the same process space as the Unity editor executable. Any allocations persist between play mode and edit mode.

It wouldn’t be especially difficult to have a stub DLL that stays persistent and loads/unloads the actual DLL as play begins and ends but this isn’t how Unity works out of the box.