OSDN Git Service
(root)
/
android-x86
/
dalvik.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe79541
)
Update storage size after expansion.
author
Andy McFadden
<fadden@android.com>
Wed, 19 Aug 2009 17:32:01 +0000
(10:32 -0700)
committer
Andy McFadden
<fadden@android.com>
Wed, 19 Aug 2009 17:32:01 +0000
(10:32 -0700)
We allow expansion in dvmSetBit(), but failed to update the capacity
after doing so.
vm/Misc.c
patch
|
blob
|
history
diff --git
a/vm/Misc.c
b/vm/Misc.c
index
6b1372c
..
f8f7256
100644
(file)
--- a/
vm/Misc.c
+++ b/
vm/Misc.c
@@
-280,6
+280,7
@@
bool dvmSetBit(BitVector* pBits, int num)
pBits->storage = realloc(pBits->storage, newSize * sizeof(u4));
memset(&pBits->storage[pBits->storageSize], 0x00,
(newSize - pBits->storageSize) * sizeof(u4));
+ pBits->storageSize = newSize;
}
pBits->storage[num >> 5] |= 1 << (num & 0x1f);