| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/process_util.h" | 5 #include "base/process_util.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <winternl.h> | 8 #include <winternl.h> |
| 9 #include <psapi.h> | 9 #include <psapi.h> |
| 10 | 10 |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 // Don't bother with the result code. It may fails on heaps that have the | 587 // Don't bother with the result code. It may fails on heaps that have the |
| 588 // HEAP_NO_SERIALIZE flag. This is expected and not a problem at all. | 588 // HEAP_NO_SERIALIZE flag. This is expected and not a problem at all. |
| 589 heap_set(heaps[i], | 589 heap_set(heaps[i], |
| 590 HeapCompatibilityInformation, | 590 HeapCompatibilityInformation, |
| 591 &lfh_flag, | 591 &lfh_flag, |
| 592 sizeof(lfh_flag)); | 592 sizeof(lfh_flag)); |
| 593 } | 593 } |
| 594 return true; | 594 return true; |
| 595 } | 595 } |
| 596 | 596 |
| 597 void EnableTerminationOnHeapCorruption() { |
| 598 // Ignore the result code. Supported on XP SP3 and Vista. |
| 599 HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0); |
| 600 } |
| 601 |
| 597 void RaiseProcessToHighPriority() { | 602 void RaiseProcessToHighPriority() { |
| 598 SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS); | 603 SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS); |
| 599 } | 604 } |
| 600 | 605 |
| 601 } // namespace process_util | 606 } // namespace process_util |
| OLD | NEW |