Changeset 21006 in vbox
- Timestamp:
- Jun 28, 2009 7:07:20 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 49220
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VHDHDDCore.cpp
r20797 r21006 223 223 224 224 /** 225 * Internal: Allocates the block bitmap rounding up to the next 32bit boundary.225 * Internal: Allocates the block bitmap rounding up to the next 32bit or 64bit boundary. 226 226 * Can be freed with RTMemFree. The memory is zeroed. 227 227 */ 228 228 DECLINLINE(uint8_t *)vhdBlockBitmapAllocate(PVHDIMAGE pImage) 229 229 { 230 return (uint8_t *)RTMemAllocZ(RT_ALIGN_T(pImage->cbDataBlockBitmap, 4, uint32_t)); 230 #ifdef RT_ARCH_AMD64 231 return (uint8_t *)RTMemAllocZ(RT_ALIGN_64(pImage->cbDataBlockBitmap, 8)); 232 #else 233 return (uint8_t *)RTMemAllocZ(RT_ALIGN_32(pImage->cbDataBlockBitmap, 4)); 234 #endif 231 235 } 232 236 … … 917 921 * The most signifcant bit stands for a lower sector number. 918 922 */ 919 uint8_t iBitInByte = ( 32-1) - (cBlockBitmapEntry % 32);923 uint8_t iBitInByte = (8-1) - (cBlockBitmapEntry % 8); 920 924 uint8_t *puBitmap = pImage->pu8Bitmap + iBitmap; 921 925 … … 937 941 * The most signifcant bit stands for a lower sector number. 938 942 */ 939 uint8_t iBitInByte = ( 32-1) - (cBlockBitmapEntry % 32);943 uint8_t iBitInByte = (8-1) - (cBlockBitmapEntry % 8); 940 944 uint8_t *puBitmap = pImage->pu8Bitmap + iBitmap; 941 945
Note:
See TracChangeset
for help on using the changeset viewer.