threaded alloc (#20492)
* allocator: catch up with multi-threading techniques * removed the global thread lock * more atomics for fun and profit * added important sysAssert * stats remain thread local and don't have to be atomic * undo split chunk optimizations in the hope it makes the CI happy
This commit is contained in:
parent
b47d5486db
commit
fbc6975922
3 changed files with 262 additions and 133 deletions
|
|
@ -17,7 +17,7 @@ type
|
|||
AtomType* = SomeNumber|pointer|ptr|char|bool
|
||||
## Type Class representing valid types for use with atomic procs
|
||||
|
||||
when someGcc and hasThreadSupport:
|
||||
when someGcc:
|
||||
type AtomMemModel* = distinct cint
|
||||
|
||||
var ATOMIC_RELAXED* {.importc: "__ATOMIC_RELAXED", nodecl.}: AtomMemModel
|
||||
|
|
@ -164,7 +164,7 @@ when someGcc and hasThreadSupport:
|
|||
## ignore this parameter.
|
||||
|
||||
template fence*() = atomicThreadFence(ATOMIC_SEQ_CST)
|
||||
elif someVcc and hasThreadSupport:
|
||||
elif someVcc:
|
||||
type AtomMemModel* = distinct cint
|
||||
|
||||
const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue