summaryrefslogtreecommitdiff
path: root/obj_map.c
diff options
context:
space:
mode:
authorivmai <ivmai>2009-09-16 14:43:37 +0000
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 21:06:46 +0400
commitdb2565100a193fa71336be2951b342ef7596f828 (patch)
tree4214eb726e4912fa34628655dc41ae247213caf8 /obj_map.c
parentd70b0280af3c3d53e2a794b26aa7a3127943b8c3 (diff)
downloadbdwgc-db2565100a193fa71336be2951b342ef7596f828.tar.gz
2009-09-16 Ivan Maidanski <ivmai@mail.ru>
* ChangeLog: Remove trailing spaces at EOLn; insert blank lines where missed. * doc/README: Expand all tabs to spaces; remove trailing spaces at EOLn; remove multiple trailing blank lines. * doc/README.autoconf: Ditto. * doc/README.DGUX386: Ditto. * doc/README.environment: Ditto. * doc/README.macros: Ditto. * doc/README.win32: Ditto. * tests/test.c: Ditto. * tests/test_cpp.cc: Ditto. * backgraph.c: Ditto. * blacklst.c: Ditto. * checksums.c: Ditto. * darwin_stop_world.c: Ditto. * dbg_mlc.c: Ditto. * dyn_load.c: Ditto. * finalize.c: Ditto. * gc_dlopen.c: Ditto. * gcj_mlc.c: Ditto. * headers.c: Ditto. * mach_dep.c: Ditto. * malloc.c: Ditto. * mallocx.c: Ditto. * new_hblk.c: Ditto. * obj_map.c: Ditto. * ptr_chck.c: Ditto. * real_malloc.c: Ditto. * reclaim.c: Ditto. * stubborn.c: Ditto. * thread_local_alloc.c: Ditto. * typd_mlc.c: Ditto. * gc_cpp.cc: Ditto. * include/gc_allocator.h: Ditto. * include/gc_backptr.h: Ditto. * include/gc_config_macros.h: Ditto. * include/gc_cpp.h: Ditto. * include/gc_gcj.h: Ditto. * include/gc_inline.h: Ditto. * include/gc_mark.h: Ditto. * include/gc_pthread_redirects.h: Ditto. * include/gc_typed.h: Ditto. * include/gc_version.h: Ditto. * include/javaxfc.h: Ditto. * include/new_gc_alloc.h: Ditto. * include/private/darwin_semaphore.h: Ditto. * include/private/dbg_mlc.h: Ditto. * include/private/gc_hdrs.h: Ditto. * include/private/gc_locks.h: Ditto. * include/private/gc_pmark.h: Ditto. * include/private/gcconfig.h: Ditto. * include/private/pthread_support.h: Ditto. * include/private/thread_local_alloc.h: Ditto. * darwin_stop_world.c: Add copyright header. * include/gc_backptr.h: Ditto. * include/gc_config_macros.h: Ditto. * include/gc_pthread_redirects.h: Ditto. * include/gc_version.h: Ditto. * include/javaxfc.h: Ditto. * include/private/darwin_semaphore.h: Ditto. * include/private/pthread_support.h: Ditto. * gc_cpp.cc: Make copyright header uniform across the package. * include/gc_cpp.h: Ditto.
Diffstat (limited to 'obj_map.c')
-rw-r--r--obj_map.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/obj_map.c b/obj_map.c
index 8198a7e5..96a2174f 100644
--- a/obj_map.c
+++ b/obj_map.c
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
* Copyright (c) 1991, 1992 by Xerox Corporation. All rights reserved.
* Copyright (c) 1999-2001 by Hewlett-Packard Company. All rights reserved.
@@ -12,13 +12,13 @@
* provided the above notices are retained, and a notice that the code was
* modified is included with the above copyright notice.
*/
-
+
/* Routines for maintaining maps describing heap block
* layouts for various object sizes. Allows fast pointer validity checks
* and fast location of object start locations on machines (such as SPARC)
* with slow division.
*/
-
+
# include "private/gc_priv.h"
/* Consider pointers that are offset bytes displaced from the beginning */
@@ -27,13 +27,13 @@
GC_API void GC_CALL GC_register_displacement(size_t offset)
{
DCL_LOCK_STATE;
-
+
LOCK();
GC_register_displacement_inner(offset);
UNLOCK();
}
-void GC_register_displacement_inner(size_t offset)
+void GC_register_displacement_inner(size_t offset)
{
if (offset >= VALID_OFFSET_SZ) {
ABORT("Bad argument to GC_register_displacement");
@@ -45,14 +45,14 @@ void GC_register_displacement_inner(size_t offset)
}
#ifdef MARK_BIT_PER_GRANULE
-/* Add a heap block map for objects of size granules to obj_map. */
-/* Return FALSE on failure. */
-/* A size of 0 granules is used for large objects. */
+/* Add a heap block map for objects of size granules to obj_map. */
+/* Return FALSE on failure. */
+/* A size of 0 granules is used for large objects. */
GC_bool GC_add_map_entry(size_t granules)
{
unsigned displ;
short * new_map;
-
+
if (granules > BYTES_TO_GRANULES(MAXOBJBYTES)) granules = 0;
if (GC_obj_map[granules] != 0) {
return(TRUE);
@@ -61,14 +61,14 @@ GC_bool GC_add_map_entry(size_t granules)
if (new_map == 0) return(FALSE);
if (GC_print_stats)
GC_log_printf("Adding block map for size of %u granules (%u bytes)\n",
- (unsigned)granules, (unsigned)(GRANULES_TO_BYTES(granules)));
+ (unsigned)granules, (unsigned)(GRANULES_TO_BYTES(granules)));
if (granules == 0) {
for (displ = 0; displ < BYTES_TO_GRANULES(HBLKSIZE); displ++) {
new_map[displ] = 1; /* Nonzero to get us out of marker fast path. */
}
} else {
for (displ = 0; displ < BYTES_TO_GRANULES(HBLKSIZE); displ++) {
- new_map[displ] = (short)(displ % granules);
+ new_map[displ] = (short)(displ % granules);
}
}
GC_obj_map[granules] = new_map;
@@ -83,7 +83,7 @@ void GC_initialize_offsets(void)
if (!offsets_initialized) {
int i;
if (GC_all_interior_pointers) {
- for (i = 0; i < VALID_OFFSET_SZ; ++i) GC_valid_offsets[i] = TRUE;
+ for (i = 0; i < VALID_OFFSET_SZ; ++i) GC_valid_offsets[i] = TRUE;
}
offsets_initialized = TRUE;
}