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

Unified Diff: base/process/memory.cc

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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 | « base/process/memory.h ('k') | base/process/memory_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/memory.cc
diff --git a/base/process/memory.cc b/base/process/memory.cc
deleted file mode 100644
index 6214f7f39c18f243a95d52cb5fa74af849e97631..0000000000000000000000000000000000000000
--- a/base/process/memory.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/debug/alias.h"
-#include "base/logging.h"
-#include "base/process/memory.h"
-
-namespace base {
-
-namespace {
-
-// Breakpad server classifies base::`anonymous namespace'::OnNoMemory as
-// out-of-memory crash.
-NOINLINE void OnNoMemory(size_t size) {
- size_t tmp_size = size;
- base::debug::Alias(&tmp_size);
- LOG(FATAL) << "Out of memory. size=" << tmp_size;
-}
-
-} // namespace
-
-void TerminateBecauseOutOfMemory(size_t size) {
- OnNoMemory(size);
-}
-
-// Defined in memory_mac.mm for Mac.
-#if !defined(OS_MACOSX)
-
-bool UncheckedCalloc(size_t num_items, size_t size, void** result) {
- const size_t alloc_size = num_items * size;
-
- // Overflow check
- if (size && ((alloc_size / size) != num_items)) {
- *result = NULL;
- return false;
- }
-
- if (!UncheckedMalloc(alloc_size, result))
- return false;
-
- memset(*result, 0, alloc_size);
- return true;
-}
-
-#endif
-
-#if defined(OS_NACL)
-bool UncheckedMalloc(size_t size, void** result) {
- *result = malloc(size);
- return *result != NULL;
-}
-#endif
-
-} // namespace base
« no previous file with comments | « base/process/memory.h ('k') | base/process/memory_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698