This commit is contained in:
Andreas Rumpf 2019-08-13 06:37:37 +02:00 • committed by GitHub
commit 433613e267
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -13,10 +13,10 @@ type
ZerosMem ## the allocator always zeros the memory on an allocation ZerosMem ## the allocator always zeros the memory on an allocation
Allocator* = ptr AllocatorObj Allocator* = ptr AllocatorObj
AllocatorObj* {.inheritable, compilerproc.} = object AllocatorObj* {.inheritable, compilerproc.} = object
alloc*: proc (a: Allocator; size: int; alignment: int = 8): pointer {.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: [].} 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: [].} realloc*: proc (a: Allocator; p: pointer; oldSize, newSize: int): pointer {.nimcall, raises: [], tags: [], gcsafe.}
deallocAll*: proc (a: Allocator) {.nimcall, raises: [], tags: [].} deallocAll*: proc (a: Allocator) {.nimcall, raises: [], tags: [], gcsafe.}
flags*: set[AllocatorFlag] flags*: set[AllocatorFlag]
name*: cstring name*: cstring
allocCount: int allocCount: int

View file

@ -1,5 +1,5 @@
discard """ discard """
cmd: '''nim cpp --newruntime $file''' cmd: '''nim cpp --newruntime --threads:on $file'''
output: '''(field: "value") output: '''(field: "value")
Indeed Indeed
axc axc