summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-08-01 21:18:08 +0800
committerGitHub <noreply@github.com>2023-08-01 15:18:08 +0200
commita23e53b4902d227353886d97ef50609709519dd9 (patch)
tree56f6a68016d67c1496dbf3ec535f6886470f3468
parent35ff70f36c0025018de3a8c5c993249d11b98292 (diff)
downloadNim-a23e53b4902d227353886d97ef50609709519dd9.tar.gz
fixes #22262; fixes `-d:useMalloc` broken with `--mm:none` and `--threads on` (#22355)
* fixes #22262; -d:useMalloc broken with --mm:none and threads on

* fixes
-rw-r--r--lib/system/mm/malloc.nim2
-rw-r--r--tests/system/tgcnone.nim3
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/system/mm/malloc.nim b/lib/system/mm/malloc.nim
index b24b6f1e0..47f1a95ae 100644
--- a/lib/system/mm/malloc.nim
+++ b/lib/system/mm/malloc.nim
@@ -88,7 +88,7 @@ type
 
 proc alloc(r: var MemRegion, size: int): pointer =
   result = alloc(size)
-proc alloc0Impl(r: var MemRegion, size: int): pointer =
+proc alloc0(r: var MemRegion, size: int): pointer =
   result = alloc0Impl(size)
 proc dealloc(r: var MemRegion, p: pointer) = dealloc(p)
 proc deallocOsPages(r: var MemRegion) = discard
diff --git a/tests/system/tgcnone.nim b/tests/system/tgcnone.nim
index 47c6c6014..1ccb9e29c 100644
--- a/tests/system/tgcnone.nim
+++ b/tests/system/tgcnone.nim
@@ -1,6 +1,7 @@
 discard """
-  matrix: "--gc:none -d:useMalloc --threads:off"
+  matrix: "--mm:none -d:useMalloc"
 """
 # bug #15617
+# bug #22262
 let x = 4
 doAssert x == 4