special abort includes one or both. toplev.h gets too few files,
system.h gets too many. */
-extern void fancy_abort PARAMS ((const char *, int, const char *))
+extern void fancy_abort (const char *, int, const char *)
ATTRIBUTE_NORETURN;
#define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__)
the following elements are here. They are never accessed so
the allocated object may be even smaller than this structure. */
char *align_p;
- double align_d;
HOST_WIDEST_INT align_i;
-#ifdef HAVE_LONG_DOUBLE
long double align_ld;
-#endif
} u;
} allocation_object;
allocate. */
alloc_pool
-create_alloc_pool (name, size, num)
- const char *name;
- size_t size;
- size_t num;
+create_alloc_pool (const char *name, size_t size, size_t num)
{
alloc_pool pool;
size_t pool_size, header_size;
pool_size = sizeof (struct alloc_pool_def);
/* and allocate that much memory. */
- pool = (alloc_pool) xmalloc (pool_size);
+ pool = xmalloc (pool_size);
/* Now init the various pieces of our pool structure. */
pool->name = xstrdup (name);
/* Free all memory allocated for the given memory pool. */
void
-free_alloc_pool (pool)
- alloc_pool pool;
+free_alloc_pool (alloc_pool pool)
{
alloc_pool_list block, next_block;
/* Allocates one element from the pool specified. */
void *
-pool_alloc (pool)
- alloc_pool pool;
+pool_alloc (alloc_pool pool)
{
alloc_pool_list header;
char *block;
size_t i;
alloc_pool_list block_header;
- /* Make the block */
- block = (char *) xmalloc (pool->block_size);
+ /* Make the block. */
+ block = xmalloc (pool->block_size);
block_header = (alloc_pool_list) block;
block += align_eight (sizeof (struct alloc_pool_list_def));
- /* Throw it on the block list */
+ /* Throw it on the block list. */
block_header->next = pool->block_list;
pool->block_list = block_header;
/* Puts PTR back on POOL's free list. */
void
-pool_free (pool, ptr)
- alloc_pool pool;
- void *ptr;
+pool_free (alloc_pool pool, void *ptr)
{
alloc_pool_list header;