Plasma GitLab Archive
Projects Blog Knowledge

Module Platform

module Platform: sig .. end
Platform-specific functions

val find_lf : Netsys_mem.memory -> int -> int -> int
Looks for the first LF char from mem[pos] to mem[endpos-1] and returns the position. Not_found if not found.
val rev_find_lf : Netsys_mem.memory -> int -> int -> int
Looks for the last LF char from mem[pos] to mem[endpos-1] and returns the position. Not_found if not found.
val str_cmp_unsafe : string -> int -> int -> string -> int -> int -> int
See str_cmp
val str_cmp : string -> int -> int -> string -> int -> int -> int
str_cmp s1 p1 l1 s2 p2 l2: The same as String.compare (String.sub s1 p1 l1) (String.sub s2 p2 l2), only faster
module Line_splitter: sig .. end
val physical_ram : unit -> int64 option
Tries to get the amount of physical RAM, in bytes. This is not available on all OS (but on a lot).
val shm_limit : unit -> int64 option
Returns a limit on the amount of POSIX shm. Right now, this is just 1/8 of physical RAM
val number_cores : unit -> int option
Returns the number of cores (or virtual cores) on the system.
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml