diff options
author | Carl Shapiro <cshapiro@google.com> | 2010-07-12 19:35:58 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-07-12 19:35:58 -0700 |
commit | d2f3ff738190d5b8d8f7ea288abc921fa9c26555 (patch) | |
tree | 6921adba2a10648405a972d0bad6688095a0ec8b | |
parent | 9da2fc026533b476fd2db167c83abad62dd9e01d (diff) | |
parent | 9cbece20cacb36193a14e9eb449d7ded091d264b (diff) | |
download | android_dalvik-d2f3ff738190d5b8d8f7ea288abc921fa9c26555.tar.gz android_dalvik-d2f3ff738190d5b8d8f7ea288abc921fa9c26555.tar.bz2 android_dalvik-d2f3ff738190d5b8d8f7ea288abc921fa9c26555.zip |
Merge "Use "long" instead of the more verbose but equivalent "long int"." into dalvik-dev
-rw-r--r-- | vm/alloc/HeapBitmap.c | 6 | ||||
-rw-r--r-- | vm/alloc/HeapBitmap.h | 16 |
2 files changed, 11 insertions, 11 deletions
diff --git a/vm/alloc/HeapBitmap.c b/vm/alloc/HeapBitmap.c index 016ea4ae4..d96d911ac 100644 --- a/vm/alloc/HeapBitmap.c +++ b/vm/alloc/HeapBitmap.c @@ -169,7 +169,7 @@ dvmHeapBitmapXorWalk(const HeapBitmap *hb1, const HeapBitmap *hb2, /* First, walk along the section of the bitmaps that may be the same. */ if (hb1->max >= hb1->base && hb2->max >= hb2->base) { - unsigned long int *p1, *p2; + unsigned long *p1, *p2; uintptr_t offset; offset = ((hb1->max < hb2->max) ? hb1->max : hb2->max) - hb1->base; @@ -180,7 +180,7 @@ dvmHeapBitmapXorWalk(const HeapBitmap *hb1, const HeapBitmap *hb2, p2 = hb2->bits; for (i = 0; i <= index; i++) { //TODO: unroll this. pile up a few in locals? - unsigned long int diff = *p1++ ^ *p2++; + unsigned long diff = *p1++ ^ *p2++; DECODE_BITS(hb1, diff, false); //BUG: if the callback was called, either max could have changed. } @@ -197,7 +197,7 @@ dvmHeapBitmapXorWalk(const HeapBitmap *hb1, const HeapBitmap *hb2, * set bits. */ const HeapBitmap *longHb; -unsigned long int *p; +unsigned long *p; //TODO: may be the same size, in which case this is wasted work longHb = (hb1->max > hb2->max) ? hb1 : hb2; i = index; diff --git a/vm/alloc/HeapBitmap.h b/vm/alloc/HeapBitmap.h index 5b1ed95b7..931bdca51 100644 --- a/vm/alloc/HeapBitmap.h +++ b/vm/alloc/HeapBitmap.h @@ -19,7 +19,7 @@ #include <stdint.h> #define HB_OBJECT_ALIGNMENT 8 -#define HB_BITS_PER_WORD (sizeof (unsigned long int) * 8) +#define HB_BITS_PER_WORD (sizeof (unsigned long) * 8) /* <offset> is the difference from .base to a pointer address. * <index> is the index of .bits that contains the bit representing @@ -54,7 +54,7 @@ struct HeapBitmap { /* The bitmap data, which points to an mmap()ed area of zeroed * anonymous memory. */ - unsigned long int *bits; + unsigned long *bits; /* The size of the used memory pointed to by bits, in bytes. This * value changes when the bitmap is shrunk. @@ -149,14 +149,14 @@ HB_INLINE_PROTO( * Internal function; do not call directly. */ HB_INLINE_PROTO( - unsigned long int + unsigned long _heapBitmapModifyObjectBit(HeapBitmap *hb, const void *obj, bool setBit, bool returnOld) ) { const uintptr_t offset = (uintptr_t)obj - hb->base; const size_t index = HB_OFFSET_TO_INDEX(offset); - const unsigned long int mask = HB_OFFSET_TO_MASK(offset); + const unsigned long mask = HB_OFFSET_TO_MASK(offset); #ifndef NDEBUG assert(hb->bits != NULL); @@ -169,8 +169,8 @@ HB_INLINE_PROTO( hb->max = (uintptr_t)obj; } if (returnOld) { - unsigned long int *p = hb->bits + index; - const unsigned long int word = *p; + unsigned long *p = hb->bits + index; + const unsigned long word = *p; *p |= mask; return word & mask; } else { @@ -191,7 +191,7 @@ HB_INLINE_PROTO( * set bits will be lost. */ HB_INLINE_PROTO( - unsigned long int + unsigned long dvmHeapBitmapSetAndReturnObjectBit(HeapBitmap *hb, const void *obj) ) { @@ -229,7 +229,7 @@ HB_INLINE_PROTO( * set bits will be lost. */ HB_INLINE_PROTO( - unsigned long int + unsigned long dvmHeapBitmapIsObjectBitSet(const HeapBitmap *hb, const void *obj) ) { |