Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Also check malloc
  • Loading branch information
SirOlaf committed Jul 25, 2024
commit 0e16c42601e0dbb99a4fc07b62ce7fd5e7009ed3
4 changes: 2 additions & 2 deletions lib/system/threadimpl.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var
nimThreadDestructionHandlers* {.rtlThreadVar.}: seq[proc () {.closure, gcsafe, raises: [].}]
when not defined(boehmgc) and not hasSharedHeap and not defined(gogc) and not defined(gcRegions):
proc deallocOsPages() {.rtl, raises: [].}
when defined(gcDestructors):
when defined(gcDestructors) and not defined(useMalloc):
proc abandonAllocator() {.rtl, raises: [].}
proc threadTrouble() {.raises: [], gcsafe.}
# create for the main thread. Note: do not insert this data into the list
Expand Down Expand Up @@ -95,7 +95,7 @@ proc threadProcWrapStackFrame[TArg](thrd: ptr Thread[TArg]) {.raises: [].} =
when declared(deallocOsPages): deallocOsPages()
else:
threadProcWrapDispatch(thrd)
when defined(gcDestructors):
when defined(gcDestructors) and not defined(useMalloc):
abandonAllocator()

template nimThreadProcWrapperBody*(closure: untyped): untyped =
Expand Down