• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can I disable linking against the system malloc?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can I disable linking against the system malloc?


  • Subject: Re: Can I disable linking against the system malloc?
  • From: Terry Simons <email@hidden>
  • Date: Mon, 4 Feb 2008 22:25:45 -0700

Yes, I'm aware of the OS X debug malloc implementations.

I'm trying to use electric fence, but it doesn't override strdup so when a string is strdup'd then subsequently freed, electric fence complains that a free was called without a corresponding malloc... so I assume strdup is using the system malloc, while the free is using electric fence.

I'm debugging one of my own applications, so I would be happy to forgo the system malloc for testing purposes, if possible.

This exercise is partly educational... I was just curious if it's possible to force the system malloc to be ignored in my particular situation.

On Feb 4, 2008, at 8:35 AM, Sean McBride wrote:

On 2/3/08 7:51 PM, Terry Simons said:

Is there a gcc flag to disable linking against the system malloc?

I've been looking, but so far haven't been able to find any such thing.

Not that I know of. But why? Are you trying to use a custom debug version of malloc? Are you aware the system has two: see 'man libgmalloc' and 'man malloc' (near the bottom).

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________ 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
  • Follow-Ups:
    • Re: Can I disable linking against the system malloc?
      • From: Markus Hitter <email@hidden>
    • Re: Can I disable linking against the system malloc?
      • From: Steve Checkoway <email@hidden>
References: 
 >Can I disable linking against the system malloc? (From: Terry Simons <email@hidden>)
 >Re: Can I disable linking against the system malloc? (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: Header File Problem; sorry to bug this list...
  • Next by Date: Re: Simple Cocoa/Web-Services Application
  • Previous by thread: Re: Can I disable linking against the system malloc?
  • Next by thread: Re: Can I disable linking against the system malloc?
  • Index(es):
    • Date
    • Thread