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

Unified Diff: base/process/memory_mac.mm

Issue 336613002: Update OOM killer to patch out CFAllocator on 10.10. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/memory_mac.mm
diff --git a/base/process/memory_mac.mm b/base/process/memory_mac.mm
index 789120f75294cbed0392aa05e851d21cb75dd4e5..575e886a175adacd6fe15105fa35e47b06336c32 100644
--- a/base/process/memory_mac.mm
+++ b/base/process/memory_mac.mm
@@ -438,7 +438,7 @@ void oom_killer_new() {
// === Core Foundation CFAllocators ===
bool CanGetContextForCFAllocator() {
- return !base::mac::IsOSYosemiteOrLater();
+ return !base::mac::IsOSLaterThanYosemite_DontCallThis();
}
CFAllocatorContext* ContextForCFAllocator(CFAllocatorRef allocator) {
@@ -449,7 +449,8 @@ CFAllocatorContext* ContextForCFAllocator(CFAllocatorRef allocator) {
return &our_allocator->_context;
} else if (base::mac::IsOSLion() ||
base::mac::IsOSMountainLion() ||
- base::mac::IsOSMavericks()) {
+ base::mac::IsOSMavericks() ||
+ base::mac::IsOSYosemite()) {
ChromeCFAllocatorLions* our_allocator =
const_cast<ChromeCFAllocatorLions*>(
reinterpret_cast<const ChromeCFAllocatorLions*>(allocator));
@@ -722,8 +723,9 @@ void EnableTerminationOnOutOfMemory() {
<< "Failed to get kCFAllocatorMallocZone allocation function.";
context->allocate = oom_killer_cfallocator_malloc_zone;
} else {
- NSLog(@"Internals of CFAllocator not known; out-of-memory failures via "
- "CFAllocator will not result in termination. http://crbug.com/45650");
+ DLOG(WARNING) << "Internals of CFAllocator not known; out-of-memory "
+ "failures via CFAllocator will not result in termination. "
+ "http://crbug.com/45650";
}
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698