Class for creating and accessing shared memory segments.

Constructor

new()

Variables

read onlyaddress:Int64

Returns the raw memory address of the shared segment.

Methods

asBuffer():NativeBuffer

Returns a NativeBuffer view of the shared memory. Note: The buffer is a view; closing SharedMemory invalidates the buffer.

close():Void

Closes the current process's connection to the shared memory.

@:value({ writable : true })open(name:String, size:Int, writable:Bool = true):Bool

Creates or opens a shared memory segment.

read(offset:Int, length:Int):Bytes

Reads data from the shared memory segment.

unlink():Void

Unlinks (deletes) the shared memory segment from the system.

write(offset:Int, bytes:Bytes):Int

Writes data to the shared memory segment.