• 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: Class gets EXC_BAD_ACCESS only as NSOperation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Class gets EXC_BAD_ACCESS only as NSOperation


  • Subject: Re: Class gets EXC_BAD_ACCESS only as NSOperation
  • From: Alexander Spohr <email@hidden>
  • Date: Tue, 24 Mar 2009 19:45:20 +0100

Hey Bill,

how about NSZoneMalloc() / NSZoneCalloc()?

Wouldn’t it be nice to create a Zone and just dump if if you’re done with all those data?

	atze



Am 24.03.2009 um 18:29 schrieb Bill Bumgarner:

On Mar 24, 2009, at 9:49 AM, James Maxwell wrote:
Ah, thanks. That makes sense, and it seems to be correct - I am processing ***lots*** of data.

I just tried making the float arrays into instance variables, wrapped in NSData objects, and it still crashes, only a little later than before.
What's the best way of getting these arrays off the stack? I've got several thousand of them to get through!


thanks for your help.

There really isn't a need to use an NSData for the arrays of stuff.

If they are just temporary to the local scope, then declare a float * and malloc. You can still use your double-indexing to retrieve / set values.

Something like:

float *x = (float *) malloc(sizeof(float) * columns * rows);

Or you could stick the same as an instance variable.

If it is still crashing, it is now for a different reason. Most likely, memory corruption -- overrun a buffer somewhere?

b.bum

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Class gets EXC_BAD_ACCESS only as NSOperation
      • From: Bill Bumgarner <email@hidden>
References: 
 >Class gets EXC_BAD_ACCESS only as NSOperation (From: James Maxwell <email@hidden>)
 >Re: Class gets EXC_BAD_ACCESS only as NSOperation (From: Bill Bumgarner <email@hidden>)
 >Re: Class gets EXC_BAD_ACCESS only as NSOperation (From: James Maxwell <email@hidden>)
 >Re: Class gets EXC_BAD_ACCESS only as NSOperation (From: Bill Bumgarner <email@hidden>)
 >Re: Class gets EXC_BAD_ACCESS only as NSOperation (From: James Maxwell <email@hidden>)
 >Re: Class gets EXC_BAD_ACCESS only as NSOperation (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: MEETING: Silicon Valley CocoaHeads March 26
  • Next by Date: Re: NSLevelIndicator Bindings Crash
  • Previous by thread: Re: Class gets EXC_BAD_ACCESS only as NSOperation
  • Next by thread: Re: Class gets EXC_BAD_ACCESS only as NSOperation
  • Index(es):
    • Date
    • Thread