• 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: Hard calculation crashes after 60Minutes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: Hard calculation crashes after 60Minutes


  • Subject: re: Hard calculation crashes after 60Minutes
  • From: "Mr. Gecko" <email@hidden>
  • Date: Sun, 31 Aug 2008 20:58:44 -0500

I believe I found the problem and it is a function I am using with a framework, so what I will do is I will get only the things need to run my program from the framework to make my app work and I may not have this problem any more.
I will see if that will help and reply.


Thanks,
Mr. Gecko

On Aug 31, 2008, at 8:29 PM, Thomas L. Moore wrote:

I started to write up one possible answer, but I see you haven't completed a loop. The following is somewhat releated...

If you're using for loops, check to make sure you're not creating and autoreleasing objects without an autorelease pool for each loop. For example:

for(i=0;i<SomeLargeNumber;i++)
{
	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init;

	//do your stuff here

	[pool release]
}

The reason is that if you autorelease, it won't free the memory until well after your for loop completes. If you don't, the code will slow and slow and then come to a halt.

...now back to your problem...

You may still be having autorelease issues or other memory handling issues. Try to get rid of autoreleased objects as much as you can. Also add some pools where they might make sense. Also make sure you properly free memory as well...

Tom

On Aug 30, 2008, at 10:08 PM, Mr. Gecko wrote:

Hello I am making a program that does a really hard calculation and it seems to crash after 60 Minutes. I don't really know why it does, I am guessing it is because I am using a for loop that takes awhile to run (an estaminet of 120 MInutes every time it loops). so I was hoping someone will be able to help me fix it.
Here is the error I am getting.
cal(18129,0xa00c9074) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Trace/BPT trap


Note I have tried doing it on other machines and it still crashes.

Thanks for help and tips,
Mr. Gecko
_______________________________________________

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


  • Prev by Date: Re: activateIgnoringOtherApps
  • Next by Date: Re: App names
  • Previous by thread: Re: Hard calculation crashes after 60Minutes
  • Next by thread: NSOutlineView and checkbox cells for child items
  • Index(es):
    • Date
    • Thread