
#13112: Windows 64-bit GHC HEAD segfaults on the code with a lot of TH stuff. ---------------------------------+-------------------------------------- Reporter: awson | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Windows | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+-------------------------------------- Comment (by awson): Replying to [comment:6 rwbarton]:
Is it possible on Windows to allocate a pool of memory addresses, below 2GB and of size, say, 1GB, without actually committing pages? I see comments in the two-step allocator about "VirtualAlloc MEM_RESERVE/MEM_COMMIT" and why it doesn't work for reserving 1TB worth of address space, but perhaps for 1GB it would be okay.
Yeah, I thought about this also. It's '''definitely''' possible, but this way we need to write a custom allocator which would commit/decommit pages inside this reserved space. This is surely doable, but not so much easily. I've also looked further down into things and found that using `MEM_TOP_DOWN` is not recommended to use for anything other than testing because of potential huge performance penalty. The good news is that `USE_LARGE_ADDRESS_SPACE` should, in fact, [http://blogs.microsoft.co.il/sasha/2016/01/05/windows-process-memory- usage-demystified/ work for latest Windows 10 versions]. `Memory.exe reserve 1000000` from the article works fine on my W10 1607. I believe W10 1511 should work either. Thus happy users of latest versions of W10 should, in theory, be able to build GHC with `USE_LARGE_ADDRESS_SPACE` enabled and run it with `heapBase` flag set to the value above, say 1GB. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13112#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler