Skip to content

Commit

Permalink
add Changes entry and documentation comment
Browse files Browse the repository at this point in the history
  • Loading branch information
damiendoligez committed Jun 28, 2023
1 parent 00e2d49 commit 24518e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Changes
Expand Up @@ -63,6 +63,11 @@ Working version
due to memory resource exhaustion. It was previous always a `Failure`.
(Anil Madhavapeddy, review by David Allsopp)

- #12318: GC: simplify the meaning of custom_minor_max_size: blocks with
out-of-heap memory above this limit are now allocated directly in
the major heap.
(Damien Doligez, report by Stephen Dolan, review by Gabriel Scherer)

### Code generation and optimizations:

- #11239: on x86-64 and RISC-V, reduce alignment of OCaml stacks from 16 to 8.
Expand Down
4 changes: 4 additions & 0 deletions runtime/caml/custom.h
Expand Up @@ -57,6 +57,10 @@ CAMLextern value caml_alloc_custom(const struct custom_operations * ops,
mlsize_t mem, /*resources consumed*/
mlsize_t max /*max resources*/);

/* [caml_alloc_custom_mem] allocates a custom block with dependent memory
(memory outside the heap that will be reclaimed when the block is
finalized). If [mem] is greater than [custom_minor_max_size] (see gc.mli)
the block is allocated directly in the major heap. */
CAMLextern value caml_alloc_custom_mem(const struct custom_operations * ops,
uintnat size, /*size in bytes*/
mlsize_t mem /*memory consumed*/);
Expand Down

0 comments on commit 24518e0

Please sign in to comment.