site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com turns out there was a bug in my zone->size function I guess I wasn't thinking too clearly On Jul 15, 2005, at 12:23 AM, Glen Beane wrote: malloc: *** Deallocation of a pointer not malloced: If I call my free directly instead it works as expected. This email sent to beaneg@umcs.maine.edu _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... Also, sorry about the email below - looking at it now I see that the last couple paragraphs really don't make any sense - &malloc obviously isn't the same address as my malloc malloc calls malloc_zone_malloc, and malloc_zone_malloc calls zone-
malloc I use malloc_default_zone to get the default zone and then I overwrite the pointers to malloc,calloc,valloc,realloc and free with pointers to my own functions. My malloc gets called as I expect, but when I call free I get the following error: If I print &malloc, I get the address of my malloc, if I print &free I see the original free. If I call malloc_default_zone and print the pointer to free I see my free, not the default free.
Why is the original free being called rather than the function I stick into the default_zone structure? malloc works as expected so I thought I was doing this right. Anyone know what I'm doing wrong? _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/beaneg% 40umcs.maine.edu This email sent to site_archiver@lists.apple.com