pike.git/
src/
constants.c
Branch:
Tag:
Non-build tags
All tags
No tags
2013-10-09
2013-10-09 15:10:01 by Arne Goedeke <el@laramies.com>
6eff5e7b0926a50f0c5bade0aeeb5d6cc01ece1e (
23
lines) (+
10
/-
13
)
[
Show
|
Annotate
]
Branch:
7.9
block_allocator: cleaned up some old includes
16:
#include "pike_error.h" #include "pike_security.h" #include "gc.h"
+
#include "block_allocator.h"
-
#include "block_alloc.h"
-
+
struct mapping *builtin_constants = 0; #ifdef PIKE_DEBUG
68:
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); }