nacl_process_host_unittest.cc 611 B

1234567891011121314151617181920
  1. // Copyright 2013 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. #include <stddef.h>
  5. #include "build/build_config.h"
  6. #include "components/nacl/browser/nacl_process_host.h"
  7. #include "testing/gtest/include/gtest/gtest.h"
  8. #if BUILDFLAG(IS_WIN)
  9. #include <windows.h>
  10. TEST(NaClProcessHostTest, AddressSpaceAllocation) {
  11. size_t size = 1 << 20; // 1 MB
  12. void* addr = nacl::AllocateAddressSpaceASLR(GetCurrentProcess(), size);
  13. bool success = VirtualFree(addr, 0, MEM_RELEASE);
  14. ASSERT_TRUE(success);
  15. }
  16. #endif