Skip to content

Commit

Permalink
Merge pull request eclipse-omr#1710 from dmitripivkine/master
Browse files Browse the repository at this point in the history
Revert back heap top calculation
  • Loading branch information
youngar authored Sep 22, 2017
2 parents 5dadb34 + b26f933 commit c10a67a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gc/base/VirtualMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ MM_VirtualMemory::initialize(MM_EnvironmentBase* env, uintptr_t size, void* pref

/* If heap touches top of address range */
if (lastByte == HIGH_ADDRESS) {
_heapTop = (void*)MM_Math::roundToFloor(_heapAlignment, ((uintptr_t)_heapBase) + (allocateSize - _tailPadding - _heapAlignment));
_heapTop = (void*)MM_Math::roundToFloor(_heapAlignment, ((uintptr_t)_baseAddress) + (allocateSize - _tailPadding - _heapAlignment));
} else {
_heapTop = (void*)MM_Math::roundToFloor(_heapAlignment, ((uintptr_t)_heapBase) + (allocateSize - _tailPadding));
_heapTop = (void*)MM_Math::roundToFloor(_heapAlignment, ((uintptr_t)_baseAddress) + (allocateSize - _tailPadding));
}

if ((_heapBase >= _heapTop) /* CMVC 45178: Need to catch the case where we aligned heapTop and heapBase to the same address and consider it an error. */
Expand Down

0 comments on commit c10a67a

Please sign in to comment.