+/* Allocates SIZE bytes in POOL, copies BUFFER into it, and
+ returns the new copy. */
+void *
+pool_clone (struct pool *pool, const void *buffer, size_t size)
+{
+ void *block = pool_alloc (pool, size);
+ memcpy (block, buffer, size);
+ return block;
+}
+
+/* Duplicates STRING, which has LENGTH characters, within POOL,
+ and returns a pointer to the duplicate. LENGTH should not
+ include the null terminator, which is always added to the
+ duplicate. For use only with strings, because the returned
+ pointere may not be aligned properly for other types. */