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

Unified Diff: base/allocator/allocator_shim_win.cc

Issue 1825823002: Cleanup: LFH only needs to be enabled on XP/2003 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge Created 4 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
« no previous file with comments | « no previous file | base/process/memory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/allocator/allocator_shim_win.cc
diff --git a/base/allocator/allocator_shim_win.cc b/base/allocator/allocator_shim_win.cc
index b65544f5dd89ad00db76f36f894347a8506e76df..2549c312edc2a8b7c3d545f6d2589733c0219df1 100644
--- a/base/allocator/allocator_shim_win.cc
+++ b/base/allocator/allocator_shim_win.cc
@@ -44,17 +44,7 @@ bool win_heap_init() {
// Set the _crtheap global here. THis allows us to offload most of the
// memory management to the CRT, except the functions we need to shim.
_crtheap = GetProcessHeap();
- if (_crtheap == NULL)
Will Harris 2016/03/30 22:36:36 this code is already going with the move to VS2015
manzagop (departed) 2016/03/31 13:04:45 Sorry, I wasn't sure how to tradeoff reviewer coun
- return false;
-
- ULONG enable_lfh = 2;
- // NOTE: Setting LFH may fail. Vista already has it enabled.
- // And under the debugger, it won't use LFH. So we
- // ignore any errors.
- HeapSetInformation(_crtheap, HeapCompatibilityInformation, &enable_lfh,
- sizeof(enable_lfh));
-
- return true;
+ return _crtheap != nullptr;
}
void* win_heap_malloc(size_t size) {
« no previous file with comments | « no previous file | base/process/memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698