• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AU/HAL buffer alignment
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AU/HAL buffer alignment


  • Subject: Re: AU/HAL buffer alignment
  • From: Kurt Bigler <email@hidden>
  • Date: Mon, 10 Mar 2003 13:11:13 -0800

on 3/10/03 12:11 PM, Jeff Moore <email@hidden> wrote:

> 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.

Thanks. And I have to admit I don't know for sure how big a page is - 4K?

I just did some ADC searches related to page size, alignment, and malloc,
but didn't turn up anything relevant about page size or about malloc
behavior.

A guess: maybe malloc does page alignment on larger objects it still does
128-bit alignment on smaller ones?

It has been my impression based on CodeWarrior experience (including some
release notes a year or more back) that all heap allocation methods are now
128-bit alignment safe. Maybe this is specific to CWs own run-time support,
but would expect CW to follow Apple's lead on this kind of thing.

So I would have figured that if the HAL allocated _each_ buffer directly
using malloc that this would be good news.

Do you have a pointer to better doc on malloc? Or should I look in Darwin?

I suppose I could just write all my altivec code to not depend on alignment,
but I suspect that might make for a bit more work.

Thanks for your help,
Kurt Bigler


>
> 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.
_______________________________________________
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.

References: 
 >Re: AU/HAL buffer alignment (From: Jeff Moore <email@hidden>)

  • Prev by Date: CFM AudioUnit
  • Next by Date: Re: AU/HAL buffer alignment
  • Previous by thread: Re: AU/HAL buffer alignment
  • Next by thread: open dialog with preview
  • Index(es):
    • Date
    • Thread