Skip to content
  • Pietro Fezzardi's avatar
    c940b116
    Use `getTypeAllocSize()` instead of `getTypeSizeInBits()` · c940b116
    Pietro Fezzardi authored
    The function `getTypeSizeInBits()` was wrongly used in many places when
    reasoning about memory allocation, memory accesses, and memory offsets,
    The result was often divided by 8 (possibly losing spare bits) or even
    multiplied by 8, which makes no sense.
    These uses were error prone, even if they didn't cause problems yet.
    The `getTypeAllocSize()` is better suited for these uses, because it
    returns the number of bytes necessary to allocate an object of the given
    Type.
    c940b116
    Use `getTypeAllocSize()` instead of `getTypeSizeInBits()`
    Pietro Fezzardi authored
    The function `getTypeSizeInBits()` was wrongly used in many places when
    reasoning about memory allocation, memory accesses, and memory offsets,
    The result was often divided by 8 (possibly losing spare bits) or even
    multiplied by 8, which makes no sense.
    These uses were error prone, even if they didn't cause problems yet.
    The `getTypeAllocSize()` is better suited for these uses, because it
    returns the number of bytes necessary to allocate an object of the given
    Type.
Loading