• 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: NSData questions (including Altivec)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSData questions (including Altivec)


  • Subject: Re: NSData questions (including Altivec)
  • From: "Sean McBride" <email@hidden>
  • Date: Mon, 20 Sep 2004 20:32:10 -0400

Nicko van Someren (email@hidden) on Mon, Sep 20, 2004 11:08 said:

>> 1) Does anybody know whether NSData guarantees to allocate memory for
>> it's buffer with 16-byte alignment so that altivec code can be used on
>> it? I'm assuming it uses malloc() for it's allocation, and malloc()
>> appears to guarantee this.
>
>There is no such guarantee in the documentation so I would suggest that
>even if it appears to do the right thing that you don't count on it.

man malloc says:

"The malloc(), calloc(), valloc(), and realloc() functions allocate
memory.  The allocated memory is aligned such that it can be used for any
data type, including AltiVec-related types."  I believe the OP is right.

There is also valloc() which does page alignments.



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSData questions (including Altivec)
      • From: Nicko van Someren <email@hidden>
References: 
 >Re: NSData questions (including Altivec) (From: Nicko van Someren <email@hidden>)

  • Prev by Date: newbie question re text field and special glyphs
  • Next by Date: How do folks group things as per Address Book?
  • Previous by thread: Re: NSData questions (including Altivec)
  • Next by thread: Re: NSData questions (including Altivec)
  • Index(es):
    • Date
    • Thread