+struct nmem_block
+{
+ char *buf; /* memory allocated in this block */
+ size_t size; /* size of buf */
+ size_t top; /* top of buffer */
+ struct nmem_block *next;
+};
+
+struct nmem_control
+{
+ int total;
+ struct nmem_block *blocks;
+ struct nmem_control *next;
+};
+
+struct align {
+ char x;
+ union {
+ char c;
+ short s;
+ int i;
+ long l;
+#if HAVE_LONG_LONG
+ long long ll;
+#endif
+ float f;
+ double d;
+ } u;
+};
+
+#define NMEM_ALIGN (offsetof(struct align, u))
+
+static int log_level = 0;
+static int log_level_initialized = 0;
+