* 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.
* 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.
* provided the above notices are retained, and a notice that the code was
* modified is included with the above copyright notice.
*/
* 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.
*/
/* 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.
*/
/* Consider pointers that are offset bytes displaced from the beginning */
/* of an object to be valid. */
/* Consider pointers that are offset bytes displaced from the beginning */
/* of an object to be valid. */
-/* 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)
-{
+ /* 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_INNER 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",
if (new_map == 0) return(FALSE);
if (GC_print_stats)
GC_log_printf("Adding block map for size of %u granules (%u bytes)\n",
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++) {
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++) {