Fix another place where the maxHeapSize is set to the
heapSizeSuggestion, now that maxHeapSize == 0 indicates "unbounded".
{
#if __GLASGOW_HASKELL__ >= 408
RtsFlags.GcFlags.heapSizeSuggestion = size / BLOCK_SIZE;
- if (RtsFlags.GcFlags.heapSizeSuggestion >
- RtsFlags.GcFlags.maxHeapSize) {
+ if (RtsFlags.GcFlags.maxHeapSize != 0 &&
+ RtsFlags.GcFlags.heapSizeSuggestion > RtsFlags.GcFlags.maxHeapSize) {
RtsFlags.GcFlags.maxHeapSize = RtsFlags.GcFlags.heapSizeSuggestion;
}
#endif