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: "Handles don't move on Mac OS X"



On Jul 28, 2005, at 12:07 PM, David Duncan wrote:

You shrink it with SetHandleSize() first.

h = NewHandle( 1000 );
SetHandleSize( h, 100 );
SetHandleSize( h, 1000 ); <- no allocation necessary.


There is also the potential that your original allocation was rounded up. I think the current threshold is 12K - allocations greater than that are page rounded, so if you asked for say 13K, then your allocation would be 16K - if you never grow beyond 16K the handle won't move.

Have we crossed back over the line, yet, into implementation details that can't be counted on?


I'm willing to believe there is documentation saying "handles in Mac OS X will never move unless you grow them, so you pretty much never need HLock any more" but is anything beyond that actually guaranteed?

Cheers,

--Dave

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

This email sent to email@hidden
References: 
 >Re: ResolveAlias leads to crash (From: Laurence Harris <email@hidden>)
 >Re: ResolveAlias leads to crash (From: David Duncan <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.