Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(777)

Unified Diff: base/process_util_unittest_mac.mm

Issue 1039007: Die on an OOM situation in many more cases.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« base/process_util_mac.mm ('K') | « base/process_util_unittest_mac.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_unittest_mac.mm
===================================================================
--- base/process_util_unittest_mac.mm (revision 41762)
+++ base/process_util_unittest_mac.mm (working copy)
@@ -8,13 +8,10 @@
@interface PsychoticallyBigObjCObject : NSObject
{
-#if __LP64__
- // On 64 bits, Objective C objects have no size limit that I can find.
- int tooBigToCount_[0xF000000000000000U / sizeof(int)];
-#else
- // On 32 bits, Objective C objects must be < 2G in size.
+ // On 32 bits, the compiler limits Objective C objects to < 2G in size, and on
+ // 64 bits, the ObjC2 Runtime Reference says that sizeof(anInstance) is
+ // constrained to 32 bits. Keep it < 2G for simplicity.
int justUnder2Gigs_[(2U * 1024 * 1024 * 1024 - 1) / sizeof(int)];
-#endif
}
@end
« base/process_util_mac.mm ('K') | « base/process_util_unittest_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698