summaryrefslogtreecommitdiffstats
path: root/stdlib
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2002-02-05 17:11:33 +0000
committerDamien Doligez <damien.doligez-inria.fr>2002-02-05 17:11:33 +0000
commit8ea64b58dcbafff1b20d1c25a342f595df82500e (patch)
tree970ac860b967777be0055598a17b30d39a70fca7 /stdlib
parentaad8905de3937cc56a2fb0d54e5b42fbddd5c4e2 (diff)
byterun/finalise.c: support pour les lazy finalises
byterun/gc_ctrl.c: ajout Gc.major_slice byterun/major_gc.c: gros bug dans les valeurs finalisees + ajout Gc.major_slice byterun/major_gc.h: gros bug dans les valeurs finalisees + ajout Gc.major_slice byterun/memory.c: typo dans un commentaire byterun/minor_gc.c: petit bug, ajout Gc.major_slice parsing/parser.mly: plus de conflits; l'automate reste identique stdlib/gc.ml: ajout Gc.major_slice stdlib/gc.mli: ajout Gc.major_slice stdlib/sys.ml: ajout Sys.ocaml_version stdlib/sys.mli: ajout Sys.ocaml_version utils/config.mlp: ajout Sys.ocaml_version git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4357 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/gc.ml1
-rw-r--r--stdlib/gc.mli12
-rw-r--r--stdlib/sys.ml6
-rw-r--r--stdlib/sys.mli8
4 files changed, 24 insertions, 3 deletions
diff --git a/stdlib/gc.ml b/stdlib/gc.ml
index c50dbaef4..b2d89cce5 100644
--- a/stdlib/gc.ml
+++ b/stdlib/gc.ml
@@ -45,6 +45,7 @@ external counters : unit -> (float * float * float) = "gc_counters";;
external get : unit -> control = "gc_get";;
external set : control -> unit = "gc_set";;
external minor : unit -> unit = "gc_minor";;
+external major_slice : int -> int = "gc_major_slice";;
external major : unit -> unit = "gc_major";;
external full_major : unit -> unit = "gc_full_major";;
external compact : unit -> unit = "gc_compaction";;
diff --git a/stdlib/gc.mli b/stdlib/gc.mli
index 81b7be578..a14fef87d 100644
--- a/stdlib/gc.mli
+++ b/stdlib/gc.mli
@@ -150,12 +150,18 @@ external set : control -> unit = "gc_set"
external minor : unit -> unit = "gc_minor"
(** Trigger a minor collection. *)
+external major_slice : int -> int = "gc_major_slice";;
+(** Do a minor collection and a slice of major collection. The argument
+ is the size of the slice, 0 to use the automatically-computed
+ slice size. In all cases, the result is the computed slice size. *)
+
external major : unit -> unit = "gc_major"
-(** Finish the current major collection cycle. *)
+(** Do a minor collection and finish the current major collection cycle. *)
external full_major : unit -> unit = "gc_full_major"
-(** Finish the current major collection cycle and perform a complete
- new cycle. This will collect all currently unreachable blocks. *)
+(** Do a minor collection, finish the current major collection cycle,
+ and perform a complete new cycle. This will collect all currently
+ unreachable blocks. *)
external compact : unit -> unit = "gc_compaction"
(** Perform a full major collection and compact the heap. Note that heap
diff --git a/stdlib/sys.ml b/stdlib/sys.ml
index d7baca331..b666a5a8a 100644
--- a/stdlib/sys.ml
+++ b/stdlib/sys.ml
@@ -73,3 +73,9 @@ let catch_break on =
set_signal sigint (Signal_handle(fun _ -> raise Break))
else
set_signal sigint Signal_default
+
+
+(* OCaml version numbers and strings, moved from utils/config.mlp.
+ Must be in the format described in sys.mli. *)
+
+let ocaml_version = "3.04+6 (2002-02-05)"
diff --git a/stdlib/sys.mli b/stdlib/sys.mli
index 236c63561..5333628e2 100644
--- a/stdlib/sys.mli
+++ b/stdlib/sys.mli
@@ -169,3 +169,11 @@ val catch_break : bool -> unit
Call [catch_break true] to enable raising [Break],
and [catch_break false] to let the system
terminate the program on user interrupt. *)
+
+
+val ocaml_version : string;;
+(** [ocaml_version] is the version of Objective Caml.
+ It is a string of the form ["major.minor[additional-info] (date)"]
+ Where major and minor are integers, date is in standard format
+ (i.e. YYYY-MM-DD), and [additional-info] is a string that may be
+ empty and does not start with a digit. *)