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

Side by Side Diff: base/allocator/oom.h

Issue 2518253002: Move Partition Allocator into Chromium base. (Closed)
Patch Set: Move OOM_CRASH into its own, more specific header. Fixes Windows build. Created 4 years 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 unified diff | Download patch
« no previous file with comments | « base/BUILD.gn ('k') | base/allocator/partition_allocator/OWNERS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BASE_ALLOCATOR_OOM_H
6 #define BASE_ALLOCATOR_OOM_H
7
8 #include "base/logging.h"
9
10 #if defined(OS_WIN)
11 #include <windows.h>
12 #endif
13
14 // OOM_CRASH() - Specialization of IMMEDIATE_CRASH which will raise a custom
15 // exception on Windows to signal this is OOM and not a normal assert.
16 #if defined(OS_WIN)
17 #define OOM_CRASH() \
18 do { \
19 ::RaiseException(0xE0000008, EXCEPTION_NONCONTINUABLE, 0, nullptr); \
danakj 2016/12/13 23:56:13 This is in base already. https://cs.chromium.org/c
20 IMMEDIATE_CRASH(); \
21 } while (0)
22 #else
23 #define OOM_CRASH() IMMEDIATE_CRASH()
24 #endif
25
26 #endif // BASE_ALLOCATOR_OOM_H
OLDNEW
« no previous file with comments | « base/BUILD.gn ('k') | base/allocator/partition_allocator/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698