Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Guard Malloc doesn't work

I'm experimenting with different profiling options that Xcode provides, but when I enabling Guard Malloc option in Diagnostics tab and trying to run, I'm getting this error with immediate crash:

dyld: could not load inserted library: /usr/lib/libgmalloc.dylib

And it is right, /usr/lib/ doesn't contain this library. I've located it in:

Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib/

So I've created link, and started Command Line Tool (just to be sure, because it apparently part of MacOS SDK), enabled Guard Malloc again but the problem remains.
I don't quite get where is a problem: does it new Xcode 4.3 inadvertence, problem with my system or planned decision by Apple to replace it with something else (maybe Instruments)?

like image 352
Alexander Avatar asked Feb 24 '12 19:02

Alexander


2 Answers

on device or simulator?

According to http://developer.apple.com/library/ios/#DOCUMENTATION/Performance/Conceptual/ManagingMemory/Articles/MallocDebug.html

You can use this option both Mac apps and also for iPhone applications running in the simulator.

like image 136
lagrangee Avatar answered Sep 22 '22 02:09

lagrangee


Well, I got stuck by this too. From an apple list:

http://prod.lists.apple.com/archives/xcode-users/2012/Feb/msg00197.html

That's a known issue that's being investigated. I think that you may be able to work around it by installing the 10.7.3 combo installer

Which means you need to download the combo installer from: http://support.apple.com/kb/DL1484?

I'm trying it now to make sure it works, but the person on the mailing list said it worked.

like image 24
christophercotton Avatar answered Sep 19 '22 02:09

christophercotton