Skip to content

Commit

Permalink
Linux fails if asked too much memory. So, we have to handle it
Browse files Browse the repository at this point in the history
  • Loading branch information
tesonep committed Oct 24, 2022
1 parent 358106e commit 988964e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/pharovm/pharo.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ void *readAddress(sqInt anExternalAddress);
EXPORT(int) isVMRunOnWorkerThread();
void setMaxStacksToPrint(sqInt anInteger);

#define allocateMemoryBaseAddress(desiredSize, baseAddress) sqAllocateMemory(0, desiredSize, baseAddress)
#define allocateMemoryBaseAddress(desiredSize, baseAddress) sqAllocateMemory(desiredSize, desiredSize, baseAddress)
2 changes: 1 addition & 1 deletion src/memoryUnix.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ sqAllocateMemory(usqInt minHeapSize, usqInt desiredHeapSize, usqInt desiredBaseA
pageSize = getpagesize();
pageMask = ~(pageSize - 1);

logDebug("Requested Size %d", desiredHeapSize);
logDebug("Requested Size %"PRIdSQINT, desiredHeapSize);

heapLimit = valign(max(desiredHeapSize, 1));
if(heapLimit < desiredHeapSize){
Expand Down

0 comments on commit 988964e

Please sign in to comment.