Top Description Inners Constructors Methods
org.lwjgl.util.hwloc

public Class HWLocShMem

extends Object
Class Inheritance
Imports
java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Sharing topologies between processes.

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.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
HWLocShMem.Functions

Contains the function pointers loaded from HWLoc.getLibrary().

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static int
hwloc_shmem_topology_adopt(PointerBuffer topologyp, int fd, long fileoffset, ByteBuffer mmap_address, long flags)

public static int
hwloc_shmem_topology_get_length(long topology, PointerBuffer lengthp, long flags)

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
nhwloc_shmem_topology_get_length(long topology, long lengthp, long flags)

public static int
nhwloc_shmem_topology_write(long topology, int fd, long fileoffset, long mmap_address, long length, long flags)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

HWLocShMemback to summary
protected HWLocShMem()

Method Detail

hwloc_shmem_topology_adoptback to summary
public static int hwloc_shmem_topology_adopt(PointerBuffer topologyp, int fd, long fileoffset, ByteBuffer mmap_address, long flags)
hwloc_shmem_topology_get_lengthback to summary
public static int hwloc_shmem_topology_get_length(long topology, PointerBuffer lengthp, long flags)
hwloc_shmem_topology_writeback to summary
public static int hwloc_shmem_topology_write(long topology, int fd, long fileoffset, ByteBuffer mmap_address, long flags)
nhwloc_shmem_topology_adoptback 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_lengthback to summary
public static int nhwloc_shmem_topology_get_length(long topology, long lengthp, long flags)
nhwloc_shmem_topology_writeback to summary
public static int nhwloc_shmem_topology_write(long topology, int fd, long fileoffset, long mmap_address, long length, long flags)
org.lwjgl.util.hwloc back to summary

public final Class HWLocShMem.Functions

extends Object
Class Inheritance

Contains the function pointers loaded from HWLoc.getLibrary().

Field Summary

Modifier and TypeField 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.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

shmem_topology_adoptback to summary
public static final long shmem_topology_adopt

Function address.

shmem_topology_get_lengthback to summary
public static final long shmem_topology_get_length

Function address.

shmem_topology_writeback to summary
public static final long shmem_topology_write

Function address.

Constructor Detail

Functionsback to summary
private Functions()