Commit 9fd51e67 by Zack Weinberg Committed by Zack Weinberg

ggc-page.c (size_lookup): Increase minimum allocation size to eight bytes.

	* ggc-page.c (size_lookup): Increase minimum allocation size
	to eight bytes.
	(ggc_print_statistics): Report size of each bin in bytes, not
	as its order; there is no longer a direct relationship.

From-SVN: r42736
parent 310668e8
2001-05-30 Zack Weinberg <zackw@stanford.edu>
* ggc-page.c (size_lookup): Increase minimum allocation size
to eight bytes.
(ggc_print_statistics): Report size of each bin in bytes, not
as its order; there is no longer a direct relationship.
2001-05-31 Jan van Male <jan.vanmale@fenk.wau.nl> 2001-05-31 Jan van Male <jan.vanmale@fenk.wau.nl>
* extend.texi: Fix formating of examples, eliminate some * extend.texi: Fix formating of examples, eliminate some
......
...@@ -826,11 +826,11 @@ release_pages () ...@@ -826,11 +826,11 @@ release_pages ()
} }
/* This table provides a fast way to determine ceil(log_2(size)) for /* This table provides a fast way to determine ceil(log_2(size)) for
allocation requests. The minimum allocation size is four bytes. */ allocation requests. The minimum allocation size is eight bytes. */
static unsigned char size_lookup[257] = static unsigned char size_lookup[257] =
{ {
2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4,
4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
...@@ -1446,7 +1446,7 @@ ggc_print_statistics () ...@@ -1446,7 +1446,7 @@ ggc_print_statistics ()
/* Collect some information about the various sizes of /* Collect some information about the various sizes of
allocation. */ allocation. */
fprintf (stderr, "\n%-5s %10s %10s %10s\n", fprintf (stderr, "\n%-5s %10s %10s %10s\n",
"Log", "Allocated", "Used", "Overhead"); "Size", "Allocated", "Used", "Overhead");
for (i = 0; i < NUM_ORDERS; ++i) for (i = 0; i < NUM_ORDERS; ++i)
{ {
page_entry *p; page_entry *p;
...@@ -1472,7 +1472,7 @@ ggc_print_statistics () ...@@ -1472,7 +1472,7 @@ ggc_print_statistics ()
overhead += (sizeof (page_entry) - sizeof (long) overhead += (sizeof (page_entry) - sizeof (long)
+ BITMAP_SIZE (OBJECTS_PER_PAGE (i) + 1)); + BITMAP_SIZE (OBJECTS_PER_PAGE (i) + 1));
} }
fprintf (stderr, "%-5d %10ld%c %10ld%c %10ld%c\n", i, fprintf (stderr, "%-5d %10ld%c %10ld%c %10ld%c\n", OBJECT_SIZE (i),
SCALE (allocated), LABEL (allocated), SCALE (allocated), LABEL (allocated),
SCALE (in_use), LABEL (in_use), SCALE (in_use), LABEL (in_use),
SCALE (overhead), LABEL (overhead)); SCALE (overhead), LABEL (overhead));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment