+/* Allocates a memory region AMT bytes in size from POOL and
+ returns a pointer to the region's start. The region is not
+ necessarily aligned, so it is most suitable for storing
+ strings. */
+void *
+pool_alloc_unaligned (struct pool *pool, size_t amt)
+{
+ assert (pool != NULL);
+
+#ifndef DISCRETE_BLOCKS
+ /* Strings need not be aligned on any boundary, but some
+ operations may be more efficient when they are. However,
+ that's only going to help with reasonably long strings. */
+ if (amt < ALIGN_SIZE)
+ {
+ if (amt == 0)
+ return NULL;
+ else
+ {
+ struct pool_block *const b = pool->blocks;
+
+ if (b->ofs + amt <= BLOCK_SIZE)
+ {
+ void *p = ((char *) b) + b->ofs;
+ b->ofs += amt;
+ return p;
+ }
+ }
+ }
+#endif
+
+ return pool_alloc (pool, amt);
+}
+