#include "libpspp/temp-file.h"
#include "libpspp/str.h"
+#include "gl/xalloc-oversized.h"
#include "gl/xalloc.h"
/* Fast, low-overhead memory block suballocator. */
strings, because the returned pointere may not be aligned
properly for other types. */
char *
-pool_strdup0 (struct pool *pool, const char *string, size_t size)
+pool_memdup0 (struct pool *pool, const char *string, size_t size)
{
char *new_string = pool_alloc_unaligned (pool, size + 1);
memcpy (new_string, string, size);
char *
pool_vasprintf (struct pool *pool, const char *format, va_list args_)
{
+ if (!pool)
+ return xvasprintf (format, args_);
+
struct pool_block *b;
va_list args;
int needed, avail;