@@ -122,7 +122,10 @@ type control =
122
122
number is less than or equal to 1000, it is a percentage of
123
123
the current heap size (i.e. setting it to 100 will double the heap
124
124
size at each increase). If it is more than 1000, it is a fixed
125
- number of words that will be added to the heap. Default: 15. *)
125
+ number of words that will be added to the heap.
126
+
127
+ This field is currently not available in OCaml 5: the field value is
128
+ always [0]. *)
126
129
127
130
space_overhead : int ;
128
131
(* * The major GC speed is computed from this parameter.
@@ -157,16 +160,19 @@ type control =
157
160
compaction is triggered at the end of each major GC cycle
158
161
(this setting is intended for testing purposes only).
159
162
If [max_overhead >= 1000000], compaction is never triggered.
160
- Default: 500. *)
163
+
164
+ This field is currently not available in OCaml 5: the field value is
165
+ always [0]. *)
161
166
162
167
stack_limit : int ;
163
168
(* * The maximum size of the fiber stacks (in words).
164
- Default: 1024k . *)
169
+ Default: 128M . *)
165
170
166
171
allocation_policy : int ;
167
172
(* * The policy used for allocating in the major heap.
168
173
169
- This option is ignored in OCaml 5.x.
174
+ This field is currently not available in OCaml 5: the field value is
175
+ always [0].
170
176
171
177
Prior to OCaml 5.0, possible values were 0, 1 and 2.
172
178
@@ -182,8 +188,10 @@ type control =
182
188
(* * The size of the window used by the major GC for smoothing
183
189
out variations in its workload. This is an integer between
184
190
1 and 50.
185
- Default: 1.
186
- @since 4.03 *)
191
+ @since 4.03
192
+
193
+ This field is currently not available in OCaml 5: the field value is
194
+ always [0]. *)
187
195
188
196
custom_major_ratio : int ;
189
197
(* * Target ratio of floating garbage to major heap size for
@@ -257,14 +265,22 @@ external get : unit -> control = "caml_gc_get"
257
265
[@@ alert unsynchronized_access
258
266
"GC parameters are a mutable global state."
259
267
]
260
- (* * Return the current values of the GC parameters in a [control] record. *)
268
+ (* * Return the current values of the GC parameters in a [control] record.
269
+
270
+ The [major_heap_increment], [max_overhead], [allocation_policy], and
271
+ [window_size] fields are currently not available in OCaml 5: their returned
272
+ field values are therefore [0]. *)
261
273
262
274
external set : control -> unit = " caml_gc_set"
263
275
[@@ alert unsynchronized_access
264
276
"GC parameters are a mutable global state."
265
277
]
266
- (* * [set r] changes the GC parameters according to the [control] record [r].
267
- The normal usage is: [Gc.set { (Gc.get()) with Gc.verbose = 0x00d }] *)
278
+ (* * [set r] changes the GC parameters according to the [control] record [r].
279
+ The normal usage is: [Gc.set { (Gc.get()) with Gc.verbose = 0x00d }]
280
+
281
+ The [major_heap_increment], [max_overhead], [allocation_policy], and
282
+ [window_size] fields are currently not available in OCaml 5: setting them
283
+ therefore has no effect. *)
268
284
269
285
external minor : unit -> unit = " caml_gc_minor"
270
286
(* * Trigger a minor collection. *)
0 commit comments