Re: malloc in obj-c/cocoa
Re: malloc in obj-c/cocoa
- Subject: Re: malloc in obj-c/cocoa
- From: Jens Bauer <email@hidden>
- Date: Sat, 7 Feb 2004 00:33:11 +0100
Hi Ben,
On Friday, Feb 6, 2004, at 22:14 Europe/Copenhagen, Ben Dougall wrote:
i'm malloc'ing little bits of memory, passing the pointers round and
stuff. getting this error:
*** malloc[22753]: error for object 0x7dbd0: Incorrect checksum for
freed object - object was probably modified after being freed; break
at szone_error
I've seen this ever so often. It's a memory overwrite.
Try disabling your code...
PositionPtr posp;
posp = (PositionPtr) malloc( i ));
while( i >= 0 ) {
// *(posp + i) = *(Buffer + i);
i--;
}
and see if the crash occurs.
If it doesn't, you know that this *is* the place it happens.
Love,
Jens
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.