These functions are used to share a topology between processes by duplicating it into a file-backed shared-memory buffer.
The master process must first get the required shared-memory size for storing this topology with shmem_topology_get_length.
Then it must find a virtual memory area of that size that is available in all processes (identical virtual addresses in all processes). On Linux, this
can be done by comparing holes found in /proc/\<pid\>/maps for each process.
Once found, it must open a destination file for storing the buffer, and pass it to shmem_topology_write together with virtual memory address and
length obtained above.
Other processes may then adopt this shared topology by opening the same file and passing it to shmem_topology_adopt with the exact same virtual
memory address and length.
| Modifier and Type | Class and Description |
|---|---|
| public static class | HWLocShMem.
Contains the function pointers loaded from |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static int | hwloc_shmem_topology_adopt(PointerBuffer topologyp, int fd, long fileoffset, ByteBuffer mmap_address, long flags)
|
| public static int | |
| public static int | hwloc_shmem_topology_write(long topology, int fd, long fileoffset, ByteBuffer mmap_address, long flags)
|
| public static int | nhwloc_shmem_topology_adopt(long topologyp, int fd, long fileoffset, long mmap_address, long length, long flags)
|
| public static int | |
| public static int | nhwloc_shmem_topology_write(long topology, int fd, long fileoffset, long mmap_address, long length, long flags)
|
| HWLocShMem | back to summary |
|---|---|
| protected HWLocShMem() | |
| hwloc_shmem_topology_adopt | back to summary |
|---|---|
| public static int hwloc_shmem_topology_adopt(PointerBuffer topologyp, int fd, long fileoffset, ByteBuffer mmap_address, long flags) | |
| hwloc_shmem_topology_get_length | back to summary |
|---|---|
| public static int hwloc_shmem_topology_get_length(long topology, PointerBuffer lengthp, long flags) | |
| hwloc_shmem_topology_write | back to summary |
|---|---|
| public static int hwloc_shmem_topology_write(long topology, int fd, long fileoffset, ByteBuffer mmap_address, long flags) | |
| nhwloc_shmem_topology_adopt | back to summary |
|---|---|
| public static int nhwloc_shmem_topology_adopt(long topologyp, int fd, long fileoffset, long mmap_address, long length, long flags) | |
| nhwloc_shmem_topology_get_length | back to summary |
|---|---|
| public static int nhwloc_shmem_topology_get_length(long topology, long lengthp, long flags) | |
| nhwloc_shmem_topology_write | back to summary |
|---|---|
| public static int nhwloc_shmem_topology_write(long topology, int fd, long fileoffset, long mmap_address, long length, long flags) | |
HWLoc.getLibrary().
| Modifier and Type | Field and Description |
|---|---|
| public static final long | shmem_topology_adopt
Function address. |
| public static final long | shmem_topology_get_length
Function address. |
| public static final long | shmem_topology_write
Function address. |
| Access | Constructor and Description |
|---|---|
| private |
| shmem_topology_adopt | back to summary |
|---|---|
| public static final long shmem_topology_adopt Function address. | |
| shmem_topology_get_length | back to summary |
|---|---|
| public static final long shmem_topology_get_length Function address. | |
| shmem_topology_write | back to summary |
|---|---|
| public static final long shmem_topology_write Function address. | |
| Functions | back to summary |
|---|---|
| private Functions() | |