Plasma GitLab Archive
Projects Blog Knowledge

Module Xdr_mstring


module Xdr_mstring: sig .. end
Managed Strings


Managed strings are used in XDR context for constant strings that are stored either as string or as memory (bigarray of char)
class type mstring = object .. end
class type mstring_factory = object .. end
val string_based_mstrings : mstring_factory
Uses strings to represent mstrings
val memory_based_mstrings : mstring_factory
Uses memory to represent mstrings. The memory bigarrays are allocated with Bigarray.Array1.create
val paligned_memory_based_mstrings : mstring_factory
Uses memory to represent mstrings. The memory bigarrays are allocated with Netsys_mem.alloc_memory_pages if available, and Bigarray.Array1.create if not.
val memory_pool_based_mstrings : Netsys_mem.memory_pool -> mstring_factory
Uses memory to represent mstrings. The memory bigarrays are obtained from the pool. The length of these mstrings is limited by the blocksize of the pool.
val length_mstrings : mstring list -> int
returns the sum of the lengths of the mstrings
val concat_mstrings : mstring list -> string
concatenates the mstrings and return them as single string. The returned string may be shared with one of the mstrings passed in.
val prefix_mstrings : mstring list -> int -> string
prefix_mstrings l n: returns the first n chars of the concatenated mstrings l as single string
val blit_mstrings_to_memory : mstring list -> Netsys_mem.memory -> unit
blits the mstrings one after the other to the memory, so that they appear there concatenated
type named_mstring_factories = (string, mstring_factory) Hashtbl.t 
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml