Differences From Artifact [663f9433ab]:
- File src/OFObject.m — part of check-in [a6f520157a] at 2023-08-08 15:32:43 on branch trunk — A few minor cleanups (user: js, size: 28684) [annotate] [blame] [check-ins using] [more...]
To Artifact [399d8957d0]:
- File
src/OFObject.m
— part of check-in
[648d29a33e]
at
2023-11-04 14:43:59
on branch trunk
— OFAllocObject: Fix calculation of extra alignment
While at it, also migrate to using OFRoundUpToPowerOf2, which is much
more readable. (user: js, size: 28712) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
332 333 334 335 336 337 338 | { OFObject *instance; size_t instanceSize; instanceSize = class_getInstanceSize(class); if OF_UNLIKELY (extraAlignment > 1) | | | > | 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 | { OFObject *instance; size_t instanceSize; instanceSize = class_getInstanceSize(class); if OF_UNLIKELY (extraAlignment > 1) extraAlignment = OFRoundUpToPowerOf2(extraAlignment, PRE_IVARS_ALIGN + instanceSize) - PRE_IVARS_ALIGN - instanceSize; instance = calloc(1, PRE_IVARS_ALIGN + instanceSize + extraAlignment + extraSize); if OF_UNLIKELY (instance == nil) { object_setClass((id)&allocFailedException, [OFAllocFailedException class]); |
︙ | ︙ |