diff --git a/src/callback.c b/src/callback.c index de977cd69a01d11427568b110ed23e33436ea3a4..080d0c9cf1482575ba7f17a26c550c4869091253 100644 --- a/src/callback.c +++ b/src/callback.c @@ -8,7 +8,7 @@ #include "pike_macros.h" #include "callback.h" #include "pike_error.h" -#include "block_alloc.h" +#include "block_allocator.h" struct callback_list fork_child_callback; @@ -36,7 +36,6 @@ struct callback #endif #endif -#include "block_allocator.h" static struct block_allocator callback_allocator = BA_INIT(sizeof(struct callback), CALLBACK_CHUNK); diff --git a/src/constants.c b/src/constants.c index 7d89182fc9c15647a7dd78325ecaf50d7a4f1d4c..7326db7af990f438242195245ba08111b95dd09f 100644 --- a/src/constants.c +++ b/src/constants.c @@ -16,8 +16,7 @@ #include "pike_error.h" #include "pike_security.h" #include "gc.h" - -#include "block_alloc.h" +#include "block_allocator.h" struct mapping *builtin_constants = 0; @@ -68,23 +67,20 @@ PMOD_EXPORT void add_global_program(const char *name, struct program *p) low_add_constant(name, p?&s:NULL); } -#undef EXIT_BLOCK -#define EXIT_BLOCK(X) do { \ - DO_IF_DEBUG (DOUBLEUNLINK (first_callable, X)); \ - free_type(X->type); \ - free_string(X->name); \ - X->name=0; \ - EXIT_PIKE_MEMOBJ(X); \ -}while(0) - -#include "block_allocator.h" static struct block_allocator callable_allocator = BA_INIT_PAGES(sizeof(struct callable), 2); void really_free_callable(struct callable * c) { - EXIT_BLOCK(c); +#ifdef PIKE_DEBUG + DOUBLEUNLINK (first_callable, c); +#endif + free_type(c->type); + free_string(c->name); + c->name=0; + EXIT_PIKE_MEMOBJ(c); ba_free(&callable_allocator, c); } + void count_memory_in_callables(size_t * num, size_t * size) { ba_count_all(&callable_allocator, num, size); } diff --git a/src/constants.h b/src/constants.h index d9ffdcdbad41cf7c39ba8d8dc3c0f1a4bed7b63c..4934f3d9889f05a07963e68ed8757cf14ee0e69d 100644 --- a/src/constants.h +++ b/src/constants.h @@ -10,7 +10,6 @@ #include "svalue.h" #include "hashtable.h" #include "las.h" /* For OPT_SIDE_EFFECT etc. */ -#include "block_alloc_h.h" typedef int (*docode_fun)(node *n); typedef node *(*optimize_fun)(node *n); diff --git a/src/modules/Parser/c.c b/src/modules/Parser/c.c index 39e4c8f4f5cf0a712903fb9b5644b0ceb13dbcff..3f2b305bda4a8997e26283195c62571dd0cbaa18 100644 --- a/src/modules/Parser/c.c +++ b/src/modules/Parser/c.c @@ -15,7 +15,6 @@ #include "mapping.h" #include "stralloc.h" #include "program_id.h" -#include "block_alloc.h" #include <ctype.h> #include "parser.h" diff --git a/src/modules/Parser/html.c b/src/modules/Parser/html.c index a0d2544649c25dc67ac031d716e08fc9427ea4cc..532a0859b5f3d1ec0a737e9b3deb2ac0abd3bb30 100644 --- a/src/modules/Parser/html.c +++ b/src/modules/Parser/html.c @@ -21,7 +21,7 @@ #include "mapping.h" #include "stralloc.h" #include "program_id.h" -#include "block_alloc.h" +#include "block_allocator.h" #include <ctype.h> #include "parser.h" @@ -88,8 +88,6 @@ struct piece struct piece *next; }; -#include "block_allocator.h" - static struct block_allocator piece_allocator = BA_INIT_PAGES(sizeof(struct piece), 2); diff --git a/src/modules/Parser/pike.c b/src/modules/Parser/pike.c index 96a6412e7a2f6870b3fca5b6f7bab0baea1318da..b988849c2fe8ea2467d19ebe6903199714a026c5 100644 --- a/src/modules/Parser/pike.c +++ b/src/modules/Parser/pike.c @@ -19,7 +19,6 @@ #include "mapping.h" #include "stralloc.h" #include "program_id.h" -#include "block_alloc.h" #include <ctype.h> #include "parser.h" diff --git a/src/modules/Parser/rcs.c b/src/modules/Parser/rcs.c index 0a2ba33f3b5fd590bd287fd0c85a52a390ee0284..3d9441699e250bfec22a9e4c2d7fd08511d511d3 100644 --- a/src/modules/Parser/rcs.c +++ b/src/modules/Parser/rcs.c @@ -14,7 +14,6 @@ #include "mapping.h" #include "stralloc.h" #include "program_id.h" -#include "block_alloc.h" #include <ctype.h> #include "parser.h" diff --git a/src/stralloc.c b/src/stralloc.c index 5d97026659c5195b8499a0a212428080c1768cc0..40d8de117b9b77b286795c7d83d26a55f52a1b7a 100644 --- a/src/stralloc.c +++ b/src/stralloc.c @@ -15,7 +15,6 @@ #include "stuff.h" #include "bignum.h" #include "interpret.h" -#include "block_alloc.h" #include "operators.h" #include "pike_float.h" #include "block_allocator.h"