• 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: Garbage Collection: memory limits, crash when using "lots" of memory, why?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Garbage Collection: memory limits, crash when using "lots" of memory, why?


  • Subject: Re: Garbage Collection: memory limits, crash when using "lots" of memory, why?
  • From: Greg Parker <email@hidden>
  • Date: Fri, 23 Sep 2011 14:08:29 -0700

On Sep 23, 2011, at 1:04 PM, Charles Srstka wrote:
> What does +[NSObject alloc] do when the process is out of memory, anyway? Does it throw an exception, or just return nil? The docs don’t seem to mention either way.

It attempts to throw an exception (though it may have done otherwise in the past). However, the Objective-C runtime and exception machinery may need to allocate memory during that path, and they will simply crash if they can't get it.

In practice, you should expect any non-trivial framework to crash if it runs out of virtual address space.


--
Greg Parker     email@hidden     Runtime Wrangler


_______________________________________________

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

References: 
 >Garbage Collection: memory limits, crash when using "lots" of memory, why? (From: Sean McBride <email@hidden>)
 >Re: Garbage Collection: memory limits, crash when using "lots" of memory, why? (From: Don Quixote de la Mancha <email@hidden>)
 >Re: Garbage Collection: memory limits, crash when using "lots" of memory, why? (From: Joar Wingfors <email@hidden>)
 >Re: Garbage Collection: memory limits, crash when using "lots" of memory, why? (From: Martin Wierschin <email@hidden>)
 >Re: Garbage Collection: memory limits, crash when using "lots" of memory, why? (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: Garbage Collection: memory limits, crash when using "lots" of memory, why?
  • Next by Date: Re: Garbage Collection: memory limits, crash when using "lots" of memory, why?
  • Previous by thread: Re: Garbage Collection: memory limits, crash when using "lots" of memory, why?
  • Next by thread: Re: Garbage Collection: memory limits, crash when using "lots" of memory, why?
  • Index(es):
    • Date
    • Thread