Look at our Core-library. It contains a module "Bigstring", which
provides many efficient I/O-functions for those. Look at
"bigstring_stubs.c", where you'll see how these functions are
implemented in C-land, e.g. when the lock gets released, etc.
I'm new to Ocaml and trying to get up to speed. Sorry, but I can't seem to find the "bigstring" module in the Core library.