From 6349f89a349a302754f506d9af3ed738a37c67c7 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Fri, 30 Jan 2015 21:10:22 -0800 Subject: Fix build breaks in GC sample project --- src/gc/gc.cpp | 3 --- src/gc/sample/gcenv.cpp | 10 ++++++++++ src/gc/sample/gcenv.h | 7 +++++++ 3 files changed, 17 insertions(+), 3 deletions(-) (limited to 'src/gc') diff --git a/src/gc/gc.cpp b/src/gc/gc.cpp index 9b9d234e08..03b0d8aeca 100644 --- a/src/gc/gc.cpp +++ b/src/gc/gc.cpp @@ -3894,9 +3894,6 @@ BOOL reserve_initial_memory (size_t normal_size, size_t large_size, size_t num_h g_lowest_address = MAX_PTR; g_highest_address = 0; - // Try to get the data all at once - ptrdiff_t allatonce_delta; - if (((size_t)MAX_PTR - large_size) < normal_size) { // we are already overflowing with just one heap. diff --git a/src/gc/sample/gcenv.cpp b/src/gc/sample/gcenv.cpp index b2c7230fd1..1d90f9361d 100644 --- a/src/gc/sample/gcenv.cpp +++ b/src/gc/sample/gcenv.cpp @@ -205,6 +205,16 @@ void * ClrVirtualAlloc( return VirtualAlloc(lpAddress, dwSize, flAllocationType, flProtect); } +void * ClrVirtualAllocAligned( + void * lpAddress, + size_t dwSize, + uint32_t flAllocationType, + uint32_t flProtect, + size_t dwAlignment) +{ + return VirtualAlloc(lpAddress, dwSize, flAllocationType, flProtect); +} + bool ClrVirtualFree( void * lpAddress, size_t dwSize, diff --git a/src/gc/sample/gcenv.h b/src/gc/sample/gcenv.h index c3c29e5319..456e416266 100644 --- a/src/gc/sample/gcenv.h +++ b/src/gc/sample/gcenv.h @@ -692,6 +692,13 @@ void * ClrVirtualAlloc( uint32_t flAllocationType, uint32_t flProtect); +void * ClrVirtualAllocAligned( + void * lpAddress, + size_t dwSize, + uint32_t flAllocationType, + uint32_t flProtect, + size_t dwAlignment); + bool ClrVirtualFree( void * lpAddress, size_t dwSize, -- cgit v1.2.3