Re: [Q] [NSValue valueWithBytes: objCType:]
Re: [Q] [NSValue valueWithBytes: objCType:]
- Subject: Re: [Q] [NSValue valueWithBytes: objCType:]
- From: Jens Alfke <email@hidden>
- Date: Thu, 31 Jul 2008 16:19:56 -0700
On 31 Jul '08, at 3:02 PM, JongAm Park wrote:
It is interesting that the exactly same memory blocks were allocated
for the interested data and dataDesc.
It's actually pretty likely... malloc( ) often reuses a recently-freed
block of the same size when it can, because this avoids heap
fragmentation and improves caching.
If you really want to see what's going on, set the environment
variable MallocScribble to 1 when running your program. This will
cause newly allocated blocks to be filled with 0xAA and freed blocks
to be filled with 0x55. It's a good way to track down references to
uninitialized or freed memory.
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden