ggc-page.c (compute_inverse): Short circuit calculation for object sizes larger than half a page.

* ggc-page.c (compute_inverse): Short circuit calculation for
	object sizes larger than half a page.

From-SVN: r56548
This commit is contained in:
Zack Weinberg 2002-08-24 03:20:33 +00:00 committed by Zack Weinberg
parent 314b5a68e3
commit 280cf02aff
2 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-08-23 Zack Weinberg <zack@codesourcery.com>
* ggc-page.c (compute_inverse): Short circuit calculation for
object sizes larger than half a page.
2002-08-23 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.c (rs6000_elf_select_section): Treat

View File

@ -1080,6 +1080,18 @@ compute_inverse (order)
{
unsigned size, inv, e;
/* There can be only one object per "page" in a bucket for sizes
larger than half a machine page; it will always have offset zero. */
if (OBJECT_SIZE (order) > G.pagesize/2)
{
if (OBJECTS_PER_PAGE (order) != 1)
abort ();
DIV_MULT (order) = 1;
DIV_SHIFT (order) = 0;
return;
}
size = OBJECT_SIZE (order);
e = 0;
while (size % 2 == 0)