Commit ebe5c4d1 authored by Mat's avatar Mat
Browse files

Expose the base address and size of the array in memory.

parent 09b84fd6
Loading
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -154,6 +154,14 @@ This constant string is the name of the array as passed to
`SharedArray.create()` or `SharedArray.attach()`. It may be passed to
`SharedArray.delete()`.

### addr

Base address of the array in memory.

### size

Size of the array in memory.

## Requirements

* Python 2.7 or 3+
+6 −0
Original line number Diff line number Diff line
@@ -62,6 +62,12 @@ static struct PyMemberDef members[] = {
	{ "name", T_STRING, offsetof (PyMapOwnerObject, name), 0,
	  "Name of the file used to back this array" },

	{ "addr", T_PYSSIZET, offsetof (PyMapOwnerObject, map_addr), 0,
	  "Base address of the shared array in memory" },

	{ "size", T_PYSSIZET, offsetof (PyMapOwnerObject, map_size), 0,
	  "Size of the shared array in memory" },

	{ NULL, 0, 0, 0, NULL }
};