• 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: Steve Checkoway <email@hidden>
  • Date: Tue, 5 Feb 2008 03:03:54 -0800


On Feb 4, 2008, at 9:25 PM, Terry Simons wrote:

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.

I'm not totally sure why you'd want to do this, but this works for me:

#include <stdlib.h>
#include <assert.h>

void *malloc( size_t size ) { return NULL; }

int main()
{
        void *p = malloc( 20 );
        assert( p == NULL );
        return 0;
}

--
Steve Checkoway

    "Anyone who says that the solution is to educate the users
    hasn't ever met an actual user." -- Bruce Schneier




Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: Jean-Daniel Dupas <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>)
 >Re: Can I disable linking against the system malloc? (From: Terry Simons <email@hidden>)

  • Prev by Date: Re: Re[2]: Creating a new project in Xcode 3.0
  • Next by Date: Re: Can I disable linking against the system malloc?
  • 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