turning off malloc output
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com User-agent: Thunderbird 3.0a1 (Macintosh/20061213) I was looking for a way to turn of malloc debugging for a program that test for a malloc failure. The same question went unanswered in http://lists.apple.com/archives/projectbuilder-users/2002/Nov/msg00179.html: * Subject: turning off malloc warnings * From: Andrew Scheck <email@hidden> * Date: Fri, 22 Nov 2002 13:17:14 -0500 This Makefile snippet: libnomalloc_printf.dylib: nomalloc_printf.c $(CC) $(CFLAGS) -dynamiclib -o $@ $< tester: tester.c libnomalloc_printf.dylib $(CC) $(CFLAGS) -Wall \ -force_flat_namespace -bind_at_load \ -L. -lnomalloc_printf \ -o $@ $< where nomalloc_printf.c just contains: void malloc_printf(const char* format, ...) will shut malloc up. This appears to be the minimum set. Is there some way to turn the malloc definitions into weak references and avoid this complication (such as force_flat_namespace)? Make these functions into variables, and name them uniquely in each library? In general, each library should be able to override mallocs, and have theirs overridden uniquely -- see the regex library for an exercise in malloc frustration. begin:vcard fn:Alexander Peyser n:Peyser;Alexander email;internet:a.peyser@umiami.edu x-mozilla-html:TRUE version:2.1 end:vcard _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Alexander Peyser