]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ggc-page.c (inverse_table): Change type of mult to size_t.
authorUlrich Weigand <uweigand@de.ibm.com>
Fri, 27 Jun 2003 17:36:21 +0000 (17:36 +0000)
committerUlrich Weigand <uweigand@gcc.gnu.org>
Fri, 27 Jun 2003 17:36:21 +0000 (17:36 +0000)
        * ggc-page.c (inverse_table): Change type of mult to size_t.
        (compute_inverse): Compute inverse using size_t, not unsigned int.
        Compute inverse also for sizes larger than half a machine page.

From-SVN: r68589

gcc/ChangeLog
gcc/ggc-page.c

index eb7aef154f3d1ccf6738cdfc8fde9c1cf4902616..a86f0a83d6a0c0e73276afa52680dfec691c2a2e 100644 (file)
@@ -1,3 +1,9 @@
+2003-06-13  Ulrich Weigand  <uweigand@de.ibm.com>
+
+        * ggc-page.c (inverse_table): Change type of mult to size_t.
+        (compute_inverse): Compute inverse using size_t, not unsigned int.
+        Compute inverse also for sizes larger than half a machine page.
+
 Fri Jun 27 18:36:12 CEST 2003  Jan Hubicka  <jh@suse.cz>
 
        * toplev.c (rest_of_decl_compilation):  Only varpoolize argument
index 4a23d01a3d7eccefd86152eae3615ae49ea4cbfa..f6fe8cdcd084904806339d6d622e61f79f18dd69 100644 (file)
@@ -231,7 +231,7 @@ static size_t object_size_table[NUM_ORDERS];
 
 static struct
 {
-  unsigned int mult;
+  size_t mult;
   unsigned int shift;
 }
 inverse_table[NUM_ORDERS];
@@ -1219,19 +1219,8 @@ ggc_get_size (const void *p)
 static void
 compute_inverse (unsigned 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_t size, inv; 
+  unsigned int e;
 
   size = OBJECT_SIZE (order);
   e = 0;