diff options
author | jcosborn <jcosborn@users.noreply.github.com> | 2018-08-01 03:57:35 -0500 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-08-01 10:57:35 +0200 |
commit | 8f4c5a8955594b4f2dc31f9629af9ad3d4780c2c (patch) | |
tree | 922a0122c66c232b17ea4947f892a805817f37cb /lib | |
parent | 9e37e3e5e85a7be33b8d1a22c64540415282bafb (diff) | |
download | Nim-8f4c5a8955594b4f2dc31f9629af9ad3d4780c2c.tar.gz |
fixed #7894 (#8496)
make system tests run properly
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system/alloc.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/system/alloc.nim b/lib/system/alloc.nim index ca2d76225..ffb7aaf86 100644 --- a/lib/system/alloc.nim +++ b/lib/system/alloc.nim @@ -436,8 +436,9 @@ proc requestOsChunks(a: var MemRegion, size: int): PBigChunk = a.nextChunkSize = PageSize*4 else: a.nextChunkSize = min(roundup(usedMem shr 2, PageSize), a.nextChunkSize * 2) - var size = size + a.nextChunkSize = min(a.nextChunkSize, MaxBigChunkSize) + var size = size if size > a.nextChunkSize: result = cast[PBigChunk](osAllocPages(size)) else: |