1 // Copyright 2013 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include <stddef.h> 6 7 #include "build/build_config.h" 8 #include "components/nacl/browser/nacl_process_host.h" 9 #include "testing/gtest/include/gtest/gtest.h" 10 11 #if BUILDFLAG(IS_WIN) 12 #include <windows.h> 13 TEST(NaClProcessHostTest,AddressSpaceAllocation)14TEST(NaClProcessHostTest, AddressSpaceAllocation) { 15 size_t size = 1 << 20; // 1 MB 16 void* addr = nacl::AllocateAddressSpaceASLR(GetCurrentProcess(), size); 17 bool success = VirtualFree(addr, 0, MEM_RELEASE); 18 ASSERT_TRUE(success); 19 } 20 #endif 21