Provides the std concurrent shared_value package.
Package: std.concurrent.shared_value
Reachable from entry: no
function allocate(size)Allocate a writable unmanaged block and return its native address.
| Parameter | Type | Default | Description |
|---|---|---|---|
size |
dynamic |
— | Value supplied for size. |
Source: std/concurrent/shared_value.ml:73
function clearRecordAt(address)Zero a native record without releasing any referenced payload.
| Parameter | Type | Default | Description |
|---|---|---|---|
address |
dynamic |
— | Value supplied for address. |
Source: std/concurrent/shared_value.ml:211
function destroyAt(address)Release an owned payload and clear its native record.
| Parameter | Type | Default | Description |
|---|---|---|---|
address |
dynamic |
— | Value supplied for address. |
Source: std/concurrent/shared_value.ml:244
function encode(value)Returns [ok, type, payload, length]. For string/bytes payload owns a native block which must either be written into a record or released.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value to process. |
Source: std/concurrent/shared_value.ml:155
function free(address)Release a block previously returned by allocate().
| Parameter | Type | Default | Description |
|---|---|---|---|
address |
dynamic |
— | Value supplied for address. |
Source: std/concurrent/shared_value.ml:84
function isShareable(value)Report whether the legacy snapshot codec supports this value category.
| Parameter | Type | Default | Description |
|---|---|---|---|
value |
dynamic |
— | Value to process. |
Source: std/concurrent/shared_value.ml:148
const MEM_COMMIT_RESERVE = 12288Legacy native-value codec retained for compatibility. The managed concurrent collections no longer need it because every thread shares the same GC heap. It remains useful for explicit snapshots passed to unmanaged native memory.
Source: std/concurrent/shared_value.ml:11
const MEM_RELEASE = 32768Track the mem release value used by this standard-library module.
Source: std/concurrent/shared_value.ml:13
function move(destination, source, count)Copy count bytes between two unmanaged addresses.
| Parameter | Type | Default | Description |
|---|---|---|---|
destination |
dynamic |
— | Value supplied for destination. |
source |
dynamic |
— | Source value to process. |
count |
dynamic |
— | Number of items to process. |
Source: std/concurrent/shared_value.ml:98
const PAGE_READWRITE = 4Track the page readwrite value used by this standard-library module.
Source: std/concurrent/shared_value.ml:15
function readAt(address)Materialize a managed value from one native snapshot record.
| Parameter | Type | Default | Description |
|---|---|---|---|
address |
dynamic |
— | Value supplied for address. |
Source: std/concurrent/shared_value.ml:226
function readI64At(address)Read a signed 64-bit integer from an unmanaged address.
| Parameter | Type | Default | Description |
|---|---|---|---|
address |
dynamic |
— | Value supplied for address. |
Source: std/concurrent/shared_value.ml:140
const RECORD_SIZE = 24Track the record size value used by this standard-library module.
Source: std/concurrent/shared_value.ml:17
function releaseEncoded(encoded)Release the payload owned by an encoded string or bytes snapshot.
| Parameter | Type | Default | Description |
|---|---|---|---|
encoded |
dynamic |
— | Value supplied for encoded. |
Source: std/concurrent/shared_value.ml:185
const TYPE_BOOL = 2Track the type bool value used by this standard-library module.
Source: std/concurrent/shared_value.ml:24
const TYPE_BYTES = 4Track the type bytes value used by this standard-library module.
Source: std/concurrent/shared_value.ml:28
const TYPE_INT = 1Track the type int value used by this standard-library module.
Source: std/concurrent/shared_value.ml:22
const TYPE_STRING = 3Track the type string value used by this standard-library module.
Source: std/concurrent/shared_value.ml:26
const TYPE_VOID = 0Track the type void value used by this standard-library module.
Source: std/concurrent/shared_value.ml:20
function writeEncodedAt(address, encoded)Write encoded metadata into a RECORD_SIZE native record.
| Parameter | Type | Default | Description |
|---|---|---|---|
address |
dynamic |
— | Value supplied for address. |
encoded |
dynamic |
— | Value supplied for encoded. |
Source: std/concurrent/shared_value.ml:197
function writeI64At(address, value)Store a signed 64-bit integer at an unmanaged address.
| Parameter | Type | Default | Description |
|---|---|---|---|
address |
dynamic |
— | Value supplied for address. |
value |
dynamic |
— | Value to process. |
Source: std/concurrent/shared_value.ml:132