OSDN Git Service

Throw OutOfMemoryError on oversize array allocs.
authorAndy McFadden <fadden@android.com>
Wed, 15 Jul 2009 23:56:00 +0000 (16:56 -0700)
committerAndy McFadden <fadden@android.com>
Thu, 16 Jul 2009 00:04:16 +0000 (17:04 -0700)
commit6da743bfe7c60ad873df72a3b6412137c4ac71dc
treef0a687d13004d18702e78dcba0855fe30aa8d9c5
parentf28359b2585f7f79958c16e3c146bdc3892cd9f9
Throw OutOfMemoryError on oversize array allocs.

We've been throwing InternalError because of a particular statement in
the JPL that suggests we should be clearing out SoftReferences before
throwing OOM.  That seems unnecessary for an array allocation that we're
rejecting because the total size doesn't fit in a 32-bit integer.

Now we just throw OOM.
vm/alloc/Heap.c