I am thinking about shared memory right now. How do I keep track of the shared data? I might mark such areas as AREA_SHARED and assign a global object to them, telling which spaces are accessing it etc. Should I allow sharing areas which aren't in page granulity, align? And can the shared area have lazy pages, which are not yet allocated? One solution would be to tweak the lazy-page-fault-handler so it would page into all the spaces.
And what about cow? Should this and shared memory be built into the same logic? (the same routines) Then, each memory space which gains access to the data would have a flag whether it wants cow or not. Then, in all the spaces which have the data mapped in, the data would be mapped ro. Any rw access would make a copy of the page for all the spaces which want cow.
It would need some tracking, if a memory space has already a full copy of the object and no longer has a common page with the original object, so I would get rid of the space from the object's list.
Hope this is at least minimally logical...
Cheers,Adrian
