From 6af147ed1e2eeec2d01cc4a63371d23f9e93fb71 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Tue, 13 Aug 2019 06:37:37 +0200 Subject: [PATCH] fixes #11844 (#11935) (cherry picked from commit 433613e2675064583ee5055d47aa89a43184e7f2) --- lib/core/allocators.nim | 8 ++++---- tests/destructor/tnewruntime_misc.nim | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/core/allocators.nim b/lib/core/allocators.nim index 962a99fd60..259319ca24 100644 --- a/lib/core/allocators.nim +++ b/lib/core/allocators.nim @@ -13,10 +13,10 @@ type ZerosMem ## the allocator always zeros the memory on an allocation Allocator* = ptr AllocatorObj AllocatorObj* {.inheritable, compilerproc.} = object - alloc*: proc (a: Allocator; size: int; alignment: int = 8): pointer {.nimcall, raises: [], tags: [].} - dealloc*: proc (a: Allocator; p: pointer; size: int) {.nimcall, raises: [], tags: [].} - realloc*: proc (a: Allocator; p: pointer; oldSize, newSize: int): pointer {.nimcall, raises: [], tags: [].} - deallocAll*: proc (a: Allocator) {.nimcall, raises: [], tags: [].} + alloc*: proc (a: Allocator; size: int; alignment: int = 8): pointer {.nimcall, raises: [], tags: [], gcsafe.} + dealloc*: proc (a: Allocator; p: pointer; size: int) {.nimcall, raises: [], tags: [], gcsafe.} + realloc*: proc (a: Allocator; p: pointer; oldSize, newSize: int): pointer {.nimcall, raises: [], tags: [], gcsafe.} + deallocAll*: proc (a: Allocator) {.nimcall, raises: [], tags: [], gcsafe.} flags*: set[AllocatorFlag] name*: cstring allocCount: int diff --git a/tests/destructor/tnewruntime_misc.nim b/tests/destructor/tnewruntime_misc.nim index 0e9541e2eb..c5f978a98d 100644 --- a/tests/destructor/tnewruntime_misc.nim +++ b/tests/destructor/tnewruntime_misc.nim @@ -1,5 +1,5 @@ discard """ - cmd: '''nim cpp --newruntime $file''' + cmd: '''nim cpp --newruntime --threads:on $file''' output: '''(field: "value") Indeed axc