diff options
| author | Jean-Baptiste Queru <jbq@google.com> | 2009-11-12 18:45:15 -0800 |
|---|---|---|
| committer | Jean-Baptiste Queru <jbq@google.com> | 2009-11-12 18:45:15 -0800 |
| commit | 72e93344b4d1ffc71e9c832ec23de0657e5b04a5 (patch) | |
| tree | 1a08d1e43d54200ea737234d865c4668c5d3535b /vm/Misc.c | |
| parent | dfd0afbcb08b871e224a28ecb4ed427a7693545c (diff) | |
| download | android_dalvik-72e93344b4d1ffc71e9c832ec23de0657e5b04a5.tar.gz android_dalvik-72e93344b4d1ffc71e9c832ec23de0657e5b04a5.tar.bz2 android_dalvik-72e93344b4d1ffc71e9c832ec23de0657e5b04a5.zip | |
eclair snapshot
Diffstat (limited to 'vm/Misc.c')
| -rw-r--r-- | vm/Misc.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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); @@ -297,6 +298,15 @@ void dvmClearBit(BitVector* pBits, int num) } /* + * Mark all bits bit as "clear". + */ +void dvmClearAllBits(BitVector* pBits) +{ + int count = pBits->storageSize; + memset(pBits->storage, 0, count * sizeof(u4)); +} + +/* * Determine whether or not the specified bit is set. */ bool dvmIsBitSet(const BitVector* pBits, int num) @@ -334,7 +344,6 @@ int dvmCountSetBits(const BitVector* pBits) return count; } - /* * Return a newly-allocated string in which all occurrences of '.' have * been changed to '/'. If we find a '/' in the original string, NULL |
