summaryrefslogtreecommitdiff
path: root/obj_map.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-03-20 09:08:55 +0000
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 21:06:56 +0400
commitc2dddb53a10205f986ae782e5b1e7105f0ea80c5 (patch)
tree311e1519f2ee67241419a1a443694dcd06bff7b4 /obj_map.c
parentdc399deadba2c4344d3e9952d1ee2b7bbf24b5e5 (diff)
downloadbdwgc-c2dddb53a10205f986ae782e5b1e7105f0ea80c5.tar.gz
2011-03-20 Ivan Maidanski <ivmai@mail.ru>
* alloc.c (GC_finish_collection): Remove redundant brackets; adjust code indentation. * blacklst.c (GC_add_to_black_list_normal): Simplify expression (to improve code readability). * blacklst.c (GC_is_black_listed): Join nested "if" (into a single conditional expression); initialize "nblocks" just before the loop beginning. * misc.c (GC_init): Don't compute initial_heap_sz if GC is already initialized. * include/private/gc_priv.h (GC_initialize_offsets): Move the function declaration to misc.c file. * obj_map.c (GC_initialize_offsets): Remove offsets_initialized static variable since the function is called only once. * tests/middle.c: Include "gc.h" instead of <gc.h>; expand all tabs to spaces; adjust code indentation; replace the K&R-style function definition with the ANSI C one. * tests/smash_test.c: Ditto. * tests/middle.c (main): Use setter for GC_all_interior_pointers; adjust printf format specifier (and cast the value passed to).
Diffstat (limited to 'obj_map.c')
-rw-r--r--obj_map.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/obj_map.c b/obj_map.c
index 972ba491..8bd09930 100644
--- a/obj_map.c
+++ b/obj_map.c
@@ -78,14 +78,9 @@ GC_INNER void GC_register_displacement_inner(size_t offset)
GC_INNER void GC_initialize_offsets(void)
{
- static GC_bool offsets_initialized = FALSE;
-
- if (!offsets_initialized) {
- int i;
- if (GC_all_interior_pointers) {
- for (i = 0; i < VALID_OFFSET_SZ; ++i)
- GC_valid_offsets[i] = TRUE;
- }
- offsets_initialized = TRUE;
- }
+ int i;
+ if (GC_all_interior_pointers) {
+ for (i = 0; i < VALID_OFFSET_SZ; ++i)
+ GC_valid_offsets[i] = TRUE;
+ }
}