Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Any useful information in this output from malloc_history?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any useful information in this output from malloc_history?



Thank you, Ken. It was interesting reading the documentation and trying out some of the tools. But all the tools told me was that, when the crash happened, lots of memory was being smashed.

Two days later...

And the problem was in a string-editing method in which I wrote the unichars of an NSString into a buffer which I had mallocced to the string's length instead of length*sizeof(unichar). [Gory details snipped]

So, the lesson is for Cocoa programmers like me to remember that you're stepping out of your usual sheltered life when you use bare- metal "C", so be very careful.

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


References: 
 >Any useful information in this output from malloc_history? (From: Jerry Krinock <email@hidden>)
 >Re: Any useful information in this output from malloc_history? (From: Ken Thomases <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.