Embodiments of the present application disclose a
memory sharing method and related device, the method is applied to a distributed
system, the distributed
system is configured with a
shared memory node and a plurality of application nodes, and the distributed
system can be applied to the field of maps. The
shared memory node can store
data objects through cloud technology, and the plurality of application nodes do not need to locally cache a large number of
data objects, but only need to refer to the
data objects cached in the
shared memory node to provide corresponding application program services, such as reading through the cloud technology. When a
remote object refers to a data object in the application node, address information pairs are recorded, when the shared memory node performs memory
garbage collection, the
remote object still referring to the data object is determined as an object to be updated through the address information pairs, the object to be updated is retained during the memory
garbage collection, and abnormal reference to the object to be updated is avoided. Therefore,
object sharing of the shared memory node has a basis for implementation, and the memory maintenance cost of the distributed system is reduced.