| OLD | NEW |
| 1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2010 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 "sandbox/src/sandbox_nt_util.h" | 5 #include "sandbox/src/sandbox_nt_util.h" |
| 6 | 6 |
| 7 #include "base/pe_image.h" | 7 #include "base/pe_image.h" |
| 8 #include "sandbox/src/sandbox_factory.h" | 8 #include "sandbox/src/sandbox_factory.h" |
| 9 #include "sandbox/src/target_services.h" | 9 #include "sandbox/src/target_services.h" |
| 10 | 10 |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 } else if (NT_PAGE == type) { | 553 } else if (NT_PAGE == type) { |
| 554 void* base = memory; | 554 void* base = memory; |
| 555 SIZE_T size = 0; | 555 SIZE_T size = 0; |
| 556 VERIFY_SUCCESS(g_nt.FreeVirtualMemory(NtCurrentProcess, &base, &size, | 556 VERIFY_SUCCESS(g_nt.FreeVirtualMemory(NtCurrentProcess, &base, &size, |
| 557 MEM_RELEASE)); | 557 MEM_RELEASE)); |
| 558 } else { | 558 } else { |
| 559 NOTREACHED_NT(); | 559 NOTREACHED_NT(); |
| 560 } | 560 } |
| 561 } | 561 } |
| 562 | 562 |
| 563 void operator delete(void* memory, sandbox::AllocationType type, |
| 564 void* near_to) { |
| 565 UNREFERENCED_PARAMETER(near_to); |
| 566 operator delete(memory, type); |
| 567 } |
| 568 |
| 563 void* __cdecl operator new(size_t size, void* buffer, | 569 void* __cdecl operator new(size_t size, void* buffer, |
| 564 sandbox::AllocationType type) { | 570 sandbox::AllocationType type) { |
| 565 UNREFERENCED_PARAMETER(size); | 571 UNREFERENCED_PARAMETER(size); |
| 566 UNREFERENCED_PARAMETER(type); | 572 UNREFERENCED_PARAMETER(type); |
| 567 return buffer; | 573 return buffer; |
| 568 } | 574 } |
| 569 | 575 |
| 570 void __cdecl operator delete(void* memory, void* buffer, | 576 void __cdecl operator delete(void* memory, void* buffer, |
| 571 sandbox::AllocationType type) { | 577 sandbox::AllocationType type) { |
| 572 UNREFERENCED_PARAMETER(memory); | 578 UNREFERENCED_PARAMETER(memory); |
| 573 UNREFERENCED_PARAMETER(buffer); | 579 UNREFERENCED_PARAMETER(buffer); |
| 574 UNREFERENCED_PARAMETER(type); | 580 UNREFERENCED_PARAMETER(type); |
| 575 } | 581 } |
| OLD | NEW |