+typedef struct nmem_block
+{
+ char *buf; /* memory allocated in this block */
+ int size; /* size of buf */
+ int top; /* top of buffer */
+ struct nmem_block *next;
+} nmem_block;
+
+typedef struct nmem_control
+{
+ int total;
+ nmem_block *blocks;
+ struct nmem_control *next;
+} nmem_control;
+