Return the alignment offset for address for an allocation of size.
Declared in <bdlma_buffermanager.h>
int
calculateAlignmentOffsetFromSize(
void const* address,
bsls::Types::size_type size) const;
Return the minimum non-negative integer that, when added to the numerical value of the specified address, yields the alignment as per the alignmentStrategy provided at construction for an allocation of the specified size. Note that if 0 == size and natural alignment was provided at construction, the result of this method is identical to the result for 0 == size and maximal alignment.
minimum non-negative integer that, when added to address, yields the required alignment for an allocation of size
| Name | Description |
|---|---|
| address | address for which to calculate the alignment offset |
| size | allocation size in bytes used to determine alignment |