Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive
Merged
Changes from all commits
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
6 changes: 4 additions & 2 deletions src/core/thread/fiber.d
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ else
version (Windows)
{
import core.stdc.stdlib : malloc, free;
import core.sys.windows.winbase;
import core.sys.windows.winnt;
}

private
Expand Down Expand Up @@ -943,7 +945,7 @@ private:
// requires too much special logic to be worthwhile.
m_ctxt = new Thread.Context;

static if ( __traits( compiles, VirtualAlloc ) )
version (Windows)
{
// reserve memory for stack
m_pmem = VirtualAlloc( null,
Expand Down Expand Up @@ -1080,7 +1082,7 @@ private:
scope(exit) Thread.slock.unlock_nothrow();
Thread.remove( m_ctxt );

static if ( __traits( compiles, VirtualAlloc ) )
version (Windows)
{
VirtualFree( m_pmem, 0, MEM_RELEASE );
}
Expand Down