The API is already there! AllocMem(, MEMF_PUBLIC) allocates shared memory, otherwise you get private memory.
You can then enforce memory protection around that, but obviously the entire OS is still built on message-passing between tasks where the message itself remains at exactly the same (public) address and isn't copied between private memory spaces, and there's a gentlemens' agreement as to who currently owns it (PutMsg/ReplyMsg)
Software like Enforcer and MuGuardianAngel already checked this, and dinged your program for accessing non-allocated memory.