Skip to content

Commit

Permalink
Merge pull request dotnet#5 from jkotas/master
Browse files Browse the repository at this point in the history
Fix build breaks in GC sample project
  • Loading branch information
gkhanna79 committed Feb 2, 2015
2 parents 70b32b0 + 6349f89 commit 0d6c51c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 10 additions & 0 deletions src/gc/sample/gcenv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 7 additions & 0 deletions src/gc/sample/gcenv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0d6c51c

Please sign in to comment.