summaryrefslogtreecommitdiff
path: root/stdlib/ephemeron.mli
diff options
context:
space:
mode:
authorJosh Berdine <josh@berdine.net>2020-05-02 22:45:37 +0100
committerJosh Berdine <josh@berdine.net>2020-05-02 22:46:48 +0100
commit5e2b28decc6736817fb6c55e334c60bf3bb84e53 (patch)
treed1cb72a5991c6cb66de58b9ce10eeff0df13de36 /stdlib/ephemeron.mli
parent9355b4e8f57fe19087046e67ef22113440608ad4 (diff)
downloadocaml-5e2b28decc6736817fb6c55e334c60bf3bb84e53.tar.gz
Fix ephemeron documentation typos
Signed-off-by: Josh Berdine <josh@berdine.net>
Diffstat (limited to 'stdlib/ephemeron.mli')
-rw-r--r--stdlib/ephemeron.mli18
1 files changed, 9 insertions, 9 deletions
diff --git a/stdlib/ephemeron.mli b/stdlib/ephemeron.mli
index 66a3e9aca0..6775b55486 100644
--- a/stdlib/ephemeron.mli
+++ b/stdlib/ephemeron.mli
@@ -13,27 +13,27 @@
(* *)
(**************************************************************************)
-(** Ephemerons and weak hash table *)
+(** Ephemerons and weak hash tables *)
-(** Ephemerons and weak hash table are useful when one wants to cache
+(** Ephemerons and weak hash tables are useful when one wants to cache
or memorize the computation of a function, as long as the
arguments and the function are used, without creating memory leaks
by continuously keeping old computation results that are not
useful anymore because one argument or the function is freed. An
implementation using {!Hashtbl.t} is not suitable because all
- associations would keep in memory the arguments and the result.
+ associations would keep the arguments and the result in memory.
Ephemerons can also be used for "adding" a field to an arbitrary
- boxed ocaml value: you can attach an information to a value
+ boxed OCaml value: you can attach some information to a value
created by an external library without memory leaks.
Ephemerons hold some keys and one or no data. They are all boxed
- ocaml values. The keys of an ephemeron have the same behavior
- than weak pointers according to the garbage collector. In fact
- ocaml weak pointers are implemented as ephemerons without data.
+ OCaml values. The keys of an ephemeron have the same behavior
+ as weak pointers according to the garbage collector. In fact
+ OCaml weak pointers are implemented as ephemerons without data.
The keys and data of an ephemeron are said to be full if they
- point to a value, empty if the value have never been set, have
+ point to a value, empty if the value has never been set, has
been unset, or was erased by the GC. In the function that accesses
the keys or data these two states are represented by the [option]
type.
@@ -60,7 +60,7 @@
{!Marshal} module.
Ephemerons are defined in a language agnostic way in this paper:
- B. Hayes, Ephemerons: a New Finalization Mechanism, OOPSLA'9
+ B. Hayes, Ephemerons: A New Finalization Mechanism, OOPSLA'97
@since 4.03.0
*)