Re: malloc_zone_batch_malloc
Re: malloc_zone_batch_malloc
- Subject: Re: malloc_zone_batch_malloc
- From: Ariel Burton <email@hidden>
- Date: Wed, 21 May 2008 20:03:53 -0400
The test program I included in my original
psoting, however, tries all sizes from 1 bytes
to 16mb without coming across a case where the
routine returns a non-zero value.
Am I missing something?
Ariel Burton
==
On Wed 21 May 16:37, Terry Lambert wrote:
>
> On May 21, 2008, at 2:00 PM, Ariel Burton wrote:
> >In what circumstances is malloc_zone_batch_malloc
> >supposed to return any memory?
>
> <http://developer.apple.com/documentation/Performance/Conceptual/ManagingMemory/Articles/MemoryAlloc.html
> >
>
> "f your code allocates multiple, identically-sized memory blocks, you
> can use the malloc_zone_batch_malloc function to allocate those blocks
> all at once. This function offers better performance than the
> equivalent series of calls to malloc to allocate the same memory.
> Performance is best when the individual block size is relatively small—
> less than 4K in size. The function does its best to allocate all of
> the requested memory but may return less than was requested. When
> using this function, check the return values carefully to see how many
> blocks were actually allocated."
>
>
> -- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden