chiark / gitweb /
Document the `pool' interface.
[mLib] / man / mLib.3
index 28fd0204b8158f1f642afbe5390cc91465a60dab..fc1009625c39d0d532f6fd1ad4941d99cd652920 100644 (file)
@@ -39,6 +39,12 @@ module, and stands alone.  It's used mainly by the memory allocation
 modules to raise exceptions when there's no more memory to be had.
 .SS "Memory allocation"
 The
+.BR arena (3)
+module provides an abstraction of memory allocation.  By writing
+appropriate arena implementations, a client program can control where
+and how memory is allocated for various structures.
+.PP
+The
 .BR alloc (3)
 module provides simple veneers onto traditional memory allocation
 functions like
@@ -50,7 +56,9 @@ and
 doesn't actually depend on
 .B strdup
 being defined in the library) which raise exceptions when there's not
-enough memory left.
+enough memory left.  These work through the
+.B arena
+layer, so that the caller can control memory allocation.
 .PP
 The
 .BR sub (3)
@@ -64,6 +72,12 @@ The
 .B track
 module (not yet documented) is a simple memory allocation tracker.  It
 can be handy when trying to fix memory leaks.
+.PP
+The
+.BR pool (3)
+module maintains resource pools which can manage memory and other
+resources, all of the resources held in a pool being destroyed along
+with the pool itself.
 .SS "String handling"
 The
 .BR str (3)
@@ -97,11 +111,10 @@ and
 which the author uses rather a lot.
 .PP
 The
-.B trace
-module (not yet documented)
-provides an interface for emitting tracing information with configurable
-verbosity levels.  It needs improving to be able to cope with outputting
-to the system log.
+.BR trace (3)
+module provides an interface for emitting tracing information with
+configurable verbosity levels.  It needs improving to be able to cope
+with outputting to the system log.
 .SS "Other data types"
 The
 .BR hash (3)
@@ -116,9 +129,9 @@ Keys and values can be arbitrary data.  It is implemented using
 .BR hash (3).
 .PP
 The
-.B dynarray
-module (not yet documented) implements unbounded sparse arrays.  It
-needs rewriting.
+.BR darray (3)
+module implements dynamically resizing arrays which support Perl-like
+stack operations efficiently.
 .SS "Miscellaneous utilities"
 The
 .BR crc32 (3)
@@ -224,6 +237,7 @@ module does background hostname and address resolution.
 .BR bres (3),
 .BR conn (3),
 .BR crc32 (3),
+.BR darray (3),
 .BR dspool (3),
 .BR dstr (3),
 .BR env (3),
@@ -242,6 +256,7 @@ module does background hostname and address resolution.
 .BR str (3),
 .BR sub (3),
 .BR sym (3),
+.BR trace (3),
 .BR tv (3),
 .BR url (3).
 .SH AUTHOR