An address needs a context
An address space gives addresses a context: which addresses exist and what they mean for an execution environment. In a virtual-memory operating system, the same virtual address value can map to different physical pages in different processes. Comparing pointer numbers therefore does not establish sharing. Threads ordinarily share the virtual address space of their process, although other aspects of their execution state differ. When distinguishing processes from threads, ask which namespace is shared rather than considering only which instruction is running. This article assumes a system with address translation and protection.
Compare two mappings
Suppose process P maps virtual address 0x4000 to physical page X, while process Q maps its own 0x4000 to page Y. A write by P does not thereby modify Q’s Y. Alternatively, P can map 0x8000 and Q can map 0xA000 to one shared page Z. Different virtual addresses can then refer to shared data. Whether a particular update is observed in the intended order still depends on the memory model and synchronization. Shared mapping establishes a storage relationship; it does not by itself provide a complete communication protocol.
Mappings also carry permissions
Mappings can have read, write and execute permissions, and can be backed by files or anonymous memory. Being numerically inside a virtual range does not imply that every operation is allowed. Writing to a read-only mapping can trigger a protection fault or a configured copy-on-write path. Nor does reserving a range imply that physical pages are already resident for all of it. Distinguish reservation, mapping, residency and permissions. These four properties answer different questions and prevent misleading statements such as “the memory exists, therefore this write must succeed.”
Isolation has boundaries
Separate address spaces help limit accidental overwrites, but processes can still communicate through authorized shared memory, files or sockets. Process isolation does not replace input validation or access control. A debugger must interpret pointer values using the target process’s mappings. Sending a raw pointer value to another process generally does not create a usable reference there. A shared-memory format often uses offsets from a known shared region instead. Even then, bounds, lifetime and synchronization rules must be specified so that both participants interpret the same bytes safely.