Re: AU/HAL buffer alignment
Re: AU/HAL buffer alignment
- Subject: Re: AU/HAL buffer alignment
- From: Jeff Moore <email@hidden>
- Date: Mon, 10 Mar 2003 14:41:42 -0800
The best documentation for malloc is the man page and our performance
document installed at
/Developer/Documentation/Essentials/Performance/performance.pdf. In
chapter 2 of the performance document is a discussion about how malloc
only hands out 16 byte aligned blocks (mostly because 16 bytes is the
smallest allocation it does, even when asked for less).
On Monday, March 10, 2003, at 01:14 PM, Kurt Bigler wrote:
on 3/10/03 12:27 PM, Chris Rogers <email@hidden> wrote:
Actually, just to clarify. malloc() does return addresses which are
always
altivec (16byte) aligned. Something which we probably have not
documented
properly, but which is very important for AudioUnits is that buffers
passed around in AudioBufferLists should ALWAYS be altivec aligned.
AudioUnits are supposed to be able to assume this alignment when doing
their internal DSP...
Thanks, that's great.
Everyone please ignore my last message a couple minutes back which
crossed
with Chris's in the mail.
-Kurt Bigler
Chris Rogers
Core Audio
Apple Computer
The HAL doesn't make any guarantees about the alignment of the
buffers. I don't think that Audio Units make any guarantees about
the alignment of the buffers either.
The HAL uses malloc to allocate it's buffers. The default behavior
of malloc is to allocate chunks a page or larger in size so as to be
page aligned. Chunks smaller than a page don't have any guarantees
about alignment.
On Saturday, March 8, 2003, at 11:05 PM, Kurt Bigler wrote:
All the buffers passed by an output AU to my render callback appear
to be VERY aligned - like on a 4K boundary. Is this something we
can count on for buffers passed from both output AUs and the HAL?
The real question is whether we can count on 128-bit alignment, to
simplify AltiVec development.
Thanks,
Kurt Bigler
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.