• 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: malloc in obj-c/cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: malloc in obj-c/cocoa
      • From: Ben Dougall <email@hidden>
References: 
 >malloc in obj-c/cocoa (From: Ben Dougall <email@hidden>)

  • Prev by Date: Re: Class variable?
  • Next by Date: Re: malloc in obj-c/cocoa
  • Previous by thread: Re: malloc in obj-c/cocoa
  • Next by thread: Re: malloc in obj-c/cocoa
  • Index(es):
    • Date
    • Thread