mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 03:32:32 +00:00
* ORC: make the adaptive strategy the default in order to fight memory consumption * added missing test case
22 lines
490 B
Nim
22 lines
490 B
Nim
discard """
|
|
outputsub: "(allocCount: 4302, deallocCount: 4300)"
|
|
cmd: "nim c --gc:orc -d:nimAllocStats $file"
|
|
"""
|
|
|
|
import asyncdispatch
|
|
# bug #15076
|
|
const
|
|
# Just to occupy some RAM
|
|
BigData = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
|
|
proc doNothing(): Future[void] {.async.} =
|
|
discard
|
|
|
|
proc main(): Future[void] {.async.} =
|
|
for x in 0 .. 1_000:
|
|
await doNothing()
|
|
|
|
waitFor main()
|
|
GC_fullCollect()
|
|
echo getAllocStats()
|