Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why does free() take 1,100 microseconds?



Hi Neal,

On Jul 26, 2005, at 7:19 AM, neal olander wrote:

I've got a time critical application that must run very, very fast.  The application is written in C++ with Project Builder, running on MacOSX.    The application runs fine, but there is a speed bottleneck I have:  I've traced it down to a single call to free()  which is freeing a memory buffer (approx 1 MB) that was earlier allocated with malloc().

This single call to free() takes about 1,100 microseconds.

<snip>

Any suggestions would be appreciated!  Thanks in advance!

How about profiling your code with Shark to find out exactly what code path is slowing you down?


Performance and optimization questions can be posted to the perfoptimization-dev mailing list:


Good luck!
--gc


__________________________________________________________________

Garth Cummings                

Apple Developer Technical Support     email@hidden


http://developer.apple.com/technicalsupport



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden

References: 
 >Why does free() take 1,100 microseconds? (From: "neal olander" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.