Data representation for shared memory
#
to_int32_array
| : 'a -> Netshm.int32_array | ; | (* | Represent the value as an int32_array | *) |
#
of_int32_array
| : Netshm.int32_array list -> 'a | ; | (* | Read the value back from its int32_array representation.
The array is given as list of array fragments in reverse
order. The fragments must not be empty. | *) |
#
of_int32_array_prefix
| : (Netshm.int32_array list -> 'a option) option | ; | (* | Read the value back from its int32_array representation.
Unlike of_int32_array , it is allowed to pass a prefix
of the whole array to this function. As of_int32_array ,
this prefix is given as list of array fragments in reverse
order. The function may return None if it is not yet
possible to reconstruct the value. Otherwise the value is
returned as Some v . | *) |
#
hash_fn
| : 'a -> int32 | ; | (* | Hash function | *) |
The data manager consists of several manager functions.
of_int32_array_prefix
is optional.
Uses either int32_manager
or int64_manager
to represent nativeint
,
depending on the size of nativeint
.
Uses either int32_manager
or int64_manager
to represent int
,
depending on the size of int
.
Represents a string in the following way. The first element is the size of the string. The following elements store the bytes. The last word is filled up with zero bytes if necessary.
Creates a compound manager for pairs from two input managers
Uses the same representation as pair_manager
, but the resulting
data manager only reads the left value of the pair.
This data manager does not support to_int32_array
.
Creates a data manager from an input data manager for optional values