Carbon


Memory Allocation Alignment Constants

Header: Multiprocessing.h

Specify the alignment of the desired memory block when calling the MPAllocateAligned function.

enum {
    kMPAllocateDefaultAligned = 0,
    kMPAllocate8ByteAligned = 3,
    kMPAllocate16ByteAligned = 4,
    kMPAllocate32ByteAligned = 5,
    kMPAllocate1024ByteAligned = 10,
    kMPAllocate4096ByteAligned = 12,
    kMPAllocateMaxAlignment = 16,
    kMPAllocateAltiVecAligned = 4,
    kMPAllocateVMXAligned = 4,
    kMPAllocateVMPageAligned = 254,
    kMPAllocateInterlockAligned = 255
};

Constant descriptions

kMPAllocateDefaultAligned

Use the default alignment.

kMPAllocate8ByteAligned

Use 8-byte alignment.

kMPAllocate16ByteAligned

Use 16-byte alignment.

kMPAllocate32ByteAligned

Use 32-byte alignment.

kMPAllocate1024ByteAligned

Use 1024-byte alignment.

kMPAllocate4096ByteAligned

Use 4096-byte alignment.

kMPAllocateMaxAlignment

Use the maximum alignment (65536 byte).

kMPAllocateAltiVecAligned

Use AltiVec alignment.

kMPAllocateVMXAligned

Use VMX (now called AltiVec) alignment.

kMPAllocateVMPageAligned

Use virtual memory page alignment. This alignment is set at runtime.

kMPAllocateInterlockAligned

Use interlock alignment, which is the alignment needed to allow the use of CPU interlock instructions (that is, lwarx and stwcx.) on the returned memory address. This alignment is set at runtime. In most cases you would never need to use this alignment.

VERSION NOTES

Introduced with Multiprocessing Services 2.0.


© 2000 Apple Computer, Inc. (Last Updated 7/13/2000)