/* Functions to support a pool of allocatable objects.
- Copyright (C) 1987, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
- 2007, 2008, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1987-2014 Free Software Foundation, Inc.
Contributed by Daniel Berlin <dan@cgsoftware.com>
This file is part of GCC.
int elt_size;
};
+/* Hashtable helpers. */
struct alloc_pool_hasher : typed_noop_remove <alloc_pool_descriptor>
{
typedef alloc_pool_descriptor value_type;
static inline bool equal (const value_type *, const compare_type *);
};
-/* Hashtable mapping alloc_pool names to descriptors. */
-static hash_table <alloc_pool_hasher> alloc_pool_hash;
-
-/* Hashtable helpers. */
inline hashval_t
alloc_pool_hasher::hash (const value_type *d)
{
return d->name == p2;
}
+/* Hashtable mapping alloc_pool names to descriptors. */
+static hash_table <alloc_pool_hasher> alloc_pool_hash;
+
/* For given name, return descriptor, create new if needed. */
static struct alloc_pool_descriptor *
allocate_pool_descriptor (const char *name)
/* Pull the first free element from the free list, and return it. */
header = pool->returned_free_list;
- VALGRIND_DISCARD (VALGRIND_MAKE_MEM_DEFINED (header, sizeof(*header)));
+ VALGRIND_DISCARD (VALGRIND_MAKE_MEM_DEFINED (header, sizeof (*header)));
pool->returned_free_list = header->next;
pool->elts_free--;