332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
|
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 = ((instanceSize + extraAlignment - 1) &
~(extraAlignment - 1)) - extraAlignment;
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]);
|