aboutsummaryrefslogtreecommitdiffhomepage
path: root/checker/analyze.mli
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-11-27 23:02:51 +0100
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-11-28 13:34:40 +0100
commitd8093626b49b539bec283285ea37ba50e79f69d4 (patch)
tree44d0fe747d6d456c989c6e1cd9065ea18ff1a163 /checker/analyze.mli
parentf303ed9fb26797b9ec7d172fe583e7ee607ae441 (diff)
Use large arrays in the checker demarshaller.
This allows to work around the size limitation of vanilla OCaml arrays on 32-bit platforms, which is rather easy to hit.
Diffstat (limited to 'checker/analyze.mli')
-rw-r--r--checker/analyze.mli18
1 files changed, 15 insertions, 3 deletions
diff --git a/checker/analyze.mli b/checker/analyze.mli
index 42efcf01d..1b6c94759 100644
--- a/checker/analyze.mli
+++ b/checker/analyze.mli
@@ -8,8 +8,20 @@ type obj =
| Struct of int * data array (* tag × data *)
| String of string
-val parse_channel : in_channel -> (data * obj array)
-val parse_string : string -> (data * obj array)
+module LargeArray :
+sig
+ type 'a t
+ val empty : 'a t
+ val length : 'a t -> int
+ val make : int -> 'a -> 'a t
+ val get : 'a t -> int -> 'a
+ val set : 'a t -> int -> 'a -> unit
+end
+(** A data structure similar to arrays but allowing to overcome the 2^22 length
+ limitation on 32-bit architecture. *)
+
+val parse_channel : in_channel -> (data * obj LargeArray.t)
+val parse_string : string -> (data * obj LargeArray.t)
(** {6 Functorized version} *)
@@ -26,7 +38,7 @@ end
module type S =
sig
type input
- val parse : input -> (data * obj array)
+ val parse : input -> (data * obj LargeArray.t)
(** Return the entry point and the reification of the memory out of a
marshalled structure. *)
end