Skip to content

Commit

Permalink
Fix the build on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ihnorton committed Apr 4, 2015
1 parent f80dfbd commit 0e127d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,10 +575,10 @@ static NOINLINE void *malloc_page(void)
while(region_i < REGION_COUNT) {
region = regions[region_i];
if (region == NULL) {
size_t alloc_size = sizeof(region_t);
#ifdef _OS_WINDOWS_
char* mem = (char*)VirtualAlloc(NULL, sizeof(region_t) + GC_PAGE_SZ, MEM_RESERVE, PAGE_READWRITE);
#else
size_t alloc_size = sizeof(region_t);
if (GC_PAGE_SZ > system_page_size)
alloc_size += GC_PAGE_SZ;
char* mem = (char*)mmap(0, alloc_size, PROT_READ | PROT_WRITE, MAP_NORESERVE | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
Expand Down
2 changes: 1 addition & 1 deletion src/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ DLLEXPORT void jl_field_offsets(jl_datatype_t *dt, ssize_t *offsets)
static long cachedPagesize = 0;
long jl_getpagesize(void)
{
if (!chachedPagesize) {
if (!cachedPagesize) {
SYSTEM_INFO systemInfo;
GetSystemInfo (&systemInfo);
cachedPagesize = systemInfo.dwPageSize;
Expand Down

0 comments on commit 0e127d4

Please sign in to comment.