[sgen] Fix the object size functions to be 64bits clean.
authorRodrigo Kumpera <kumpera@gmail.com>
Wed, 4 Jun 2014 17:21:58 +0000 (13:21 -0400)
committerRodrigo Kumpera <kumpera@gmail.com>
Wed, 4 Jun 2014 17:34:48 +0000 (13:34 -0400)
mono/metadata/sgen-gc.c
mono/metadata/sgen-gc.h

index 5274e84d431792f1c76c8978cd196b15cbd93bb2..6ebe08ac129e5dfcd0d6dd6d8c3408e8b4331f20 100644 (file)
@@ -1721,7 +1721,7 @@ sgen_check_section_scan_starts (GCMemSection *section)
        size_t i;
        for (i = 0; i < section->num_scan_start; ++i) {
                if (section->scan_starts [i]) {
-                       guint size = safe_object_get_size ((MonoObject*) section->scan_starts [i]);
+                       mword size = safe_object_get_size ((MonoObject*) section->scan_starts [i]);
                        g_assert (size >= sizeof (MonoObject) && size <= MAX_SMALL_OBJ_SIZE);
                }
        }
index 9cd8e9e96b7fbe1d8d7cc427f5578b92063a1293..5f77d2b638c14265c93325aea90d15543d85949e 100644 (file)
@@ -737,7 +737,7 @@ typedef struct {
 
 SgenRemeberedSet *sgen_get_remset (void) MONO_INTERNAL;
 
-static guint /*__attribute__((noinline)) not sure if this hint is a good idea*/
+static mword /*__attribute__((noinline)) not sure if this hint is a good idea*/
 slow_object_get_size (MonoVTable *vtable, MonoObject* o)
 {
        MonoClass *klass = vtable->klass;
@@ -768,7 +768,7 @@ slow_object_get_size (MonoVTable *vtable, MonoObject* o)
  * vtable field, is not intact.  This is necessary for the parallel
  * collector.
  */
-static inline guint
+static inline mword
 sgen_par_object_get_size (MonoVTable *vtable, MonoObject* o)
 {
        mword descr = (mword)vtable->gc_descr;
@@ -795,7 +795,7 @@ sgen_par_object_get_size (MonoVTable *vtable, MonoObject* o)
        return slow_object_get_size (vtable, o);
 }
 
-static inline guint
+static inline mword
 sgen_safe_object_get_size (MonoObject *obj)
 {
        char *forwarded;