You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Object sharing is the current topic of research right now. It's fairly OK to share plain-old-data, but it would be nice if it could be more dynamic somehow.
structGameObject objects[200]; // Page worth of objects/* Insert objects into memory. This allows zero-copy sharing of game state. */staticconstexpr Script::gaddr_t OBJECT_AREA = 0xC000000;
gameplay.machine().memory.insert_non_owned_memory(
OBJECT_AREA, objects, sizeof(objects) & ~4095UL);
This is the current way of doing things.
We can now access the objects in the VMs, and if we use the same inline code interface the output should be the same.
The text was updated successfully, but these errors were encountered:
One idea here is to use the heap allocator to guarantee the object doesn't cross a page. If that were added, we could allocate and emplace objects at-will.
One idea here is to use the heap allocator to guarantee the object doesn't cross a page. If that were added, we could allocate and emplace objects at-will.
I've implemented this and it seems to work well. No real performance penalty other than a possible double-chunk split in order to handle page boundaries. Now I am wondering if there are other places that could benefit from this.
Object sharing is the current topic of research right now. It's fairly OK to share plain-old-data, but it would be nice if it could be more dynamic somehow.
This is the current way of doing things.
We can now access the objects in the VMs, and if we use the same inline code interface the output should be the same.
The text was updated successfully, but these errors were encountered: