diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-01 19:12:58 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-01 19:12:58 +0000 |
commit | c9d7c211e90e2f811a03d25542afb4302c47525e (patch) | |
tree | 459d6098f544729b8bc3f955933ce204acb7134c /base | |
parent | 426c13cfe5b8b55b2d74f02d9630901b15dfb5f6 (diff) | |
download | chromium_src-c9d7c211e90e2f811a03d25542afb4302c47525e.zip chromium_src-c9d7c211e90e2f811a03d25542afb4302c47525e.tar.gz chromium_src-c9d7c211e90e2f811a03d25542afb4302c47525e.tar.bz2 |
Reverting 37721.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37723 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/process_util_mac.mm | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/base/process_util_mac.mm b/base/process_util_mac.mm index e1988cf..9c0a2a4 100644 --- a/base/process_util_mac.mm +++ b/base/process_util_mac.mm @@ -12,7 +12,6 @@ #include <mach/task.h> #include <malloc/malloc.h> #include <spawn.h> -#include <sys/mman.h> #include <sys/sysctl.h> #include <sys/types.h> #include <sys/wait.h> @@ -23,7 +22,6 @@ #include "base/eintr_wrapper.h" #include "base/logging.h" #include "base/string_util.h" -#include "base/sys_info.h" #include "base/sys_string_conversions.h" #include "base/time.h" @@ -425,25 +423,7 @@ void EnableTerminationOnOutOfMemory() { // Nevertheless this is better than nothing for now. // TODO(avi):Do better. http://crbug.com/12673 - int32 major; - int32 minor; - int32 bugfix; - SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix); - bool zone_allocators_protected = ((major == 10 && minor > 6) || major > 10); - malloc_zone_t* default_zone = malloc_default_zone(); - - vm_address_t page_start; - vm_size_t len; - if (zone_allocators_protected) { - // See http://trac.webkit.org/changeset/53362/trunk/WebKitTools/DumpRenderTree/mac - page_start = reinterpret_cast<vm_address_t>(default_zone) & - static_cast<vm_size_t>(~(getpagesize() - 1)); - len = reinterpret_cast<vm_address_t>(default_zone) - - page_start + sizeof(malloc_zone_t); - mprotect(reinterpret_cast<void*>(page_start), len, PROT_READ | PROT_WRITE); - } - g_old_malloc = default_zone->malloc; g_old_calloc = default_zone->calloc; g_old_valloc = default_zone->valloc; @@ -455,10 +435,6 @@ void EnableTerminationOnOutOfMemory() { default_zone->calloc = oom_killer_calloc; default_zone->valloc = oom_killer_valloc; default_zone->realloc = oom_killer_realloc; - - if (zone_allocators_protected) { - mprotect(reinterpret_cast<void*>(page_start), len, PROT_READ); - } } } // namespace base |