/* PSPP - computes sample statistics.
Copyright (C) 2000 Free Software Foundation, Inc.
- Written by Ben Pfaff <blp@gnu.org>.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
02110-1301, USA. */
#include <config.h>
-#include "pool.h"
-#include "command.h"
+#include <libpspp/pool.h>
+#include <language/command.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
/* Self-test routine.
This is not exhaustive, but it can be useful. */
int
-cmd_debug_pool (void)
+cmd_debug_pool (struct lexer *lexer UNUSED, struct dataset *ds UNUSED)
{
int seed = time (0) * 257 % 32768;
printf (" Marking pool state...\n");
pool_mark (pool, &m2);
-
+
printf (" Populating pool with random-sized small "
"and large objects...\n");
for (i = 0; i < N_ITERATIONS; i++)
}
else if (type == 1)
pool_create_subpool (pool);
- else
+ else
{
size_t size = rand () % (2 * MAX_SUBALLOC);
void *p = pool_alloc (pool, size);
memset (p, 0, size);
}
}
-
+
printf ("Releasing pool state...\n");
pool_release (pool, &m1);