diff --git a/site/releases/5.1/api/Gc.html b/site/releases/5.1/api/Gc.html index 6f48d455f..e43194148 100644 --- a/site/releases/5.1/api/Gc.html +++ b/site/releases/5.1/api/Gc.html @@ -587,13 +587,11 @@
(*
Maximum amount of out-of-heap memory for each custom value
- allocated in the minor heap. When a custom value is allocated
- on the minor heap and holds more than this many bytes, only
- this value is counted against custom_minor_ratio
and the
- rest is directly counted against custom_major_ratio
.
+ allocated in the minor heap. Custom values that hold more
+ than this many bytes are allocated on the major heap.
Note: this only applies to values allocated with
caml_alloc_custom_mem
(e.g. bigarrays).
- Default: 8192 bytes.
*)
|
Compression
(*
Compress the output if possible
-*)
The flags to the Marshal.to_*
functions below.
The flags to the Marshal.to_*
functions below.
val to_channel : out_channel -> 'a -> extern_flags list -> unit
If flags
contains Marshal.Compression
, the marshaled data
- representing value v
is compressed before being written to
- channel chan
. Decompression takes place automatically in
- the unmarshaling functions input_value
, Marshal.from_channel
,
- Marshal.from_string
, etc. For large values v
, compression
- typically reduces the size of marshaled data by a factor 2 to 4,
- but slows down marshaling and, to a lesser extent, unmarshaling.
- Compression is not supported on some platforms; in this case,
- the Marshal.Compression
flag is silently ignored and uncompressed
- data is written to channel chan
.
If flags
contains Marshal.Compat_32
, marshaling fails when
it encounters an integer value outside the range [-2{^30}, 2{^30}-1]
of integers that are representable on a 32-bit platform. This
@@ -261,7 +231,6 @@
Failure
if chan
is not in binary mode.val compression_supported : unit -> bool
Indicates whether the compressed data format is supported.
- -If Marshal.compression_supported()
is true
, compressed data
- is unmarshaled safely by input_value
, Marshal.from_channel
,
- Marshal.from_string
and related functions. Moreover, the
- Marshal.Compression
flag is honored by the Marshal.to_channel
,
- Marshal.to_string
and related functions, resulting in the
- production of compressed data.
If Marshal.compression_supported()
is false
, compressed data
- causes input_value
, Marshal.from_channel
,
- Marshal.from_string
and related functions to fail and a
- Failure
exception to be raised. Moreover,
- Marshal.to_channel
, Marshal.to_string
and related functions
- ignore the Marshal.Compression
flag and produce uncompressed
- data.