question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The compiler is out of heap space

See original GitHub issue

First, I just want to say thank you for your work - this is a really tremendous effort and has helped us a lot with out own tooling process.

We’re not using your ue4 python package directly but we have followed your docker image layout so we thought maybe you could give us some guidance. Basically, we’ve gotten all the way to the ue4-minimal image and are attempting to compile the build. When we run:

RUN .\Engine\Build\BatchFiles\RunUAT.bat BuildGraph -target="Make Installed Build Win64" -script=Engine/Build/InstalledEngineBuild.xml -set:HostPlatformOnly=true

We’re running into the issue fatal error c1060, the compiler is out of heap space. Specifically it’s getting to the [2/10] Compile UnrealHeaderTool Win64 step and that’s where it dies with the above error.

I’m assuming this is just a basic config step that we’ve missed - although not sure where (I think we’ve pretty much captured everything).

The only caveat is that we’re running this inside of a virtual machine which could affect it. However, it’s specs are:

  • Parallels for Mac
  • Windows Enterprise
  • 2tb of storage
  • 16gb or RAM
  • 3 cores

Any idea’s for further investigation?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
adamrehncommented, Jul 5, 2020

@dskvr as I mentioned in this comment regarding minimum system requirements, you’ll need to do a bit of experimentation to determine the appropriate pagefile size for your system’s number of virtual CPU cores (basically the number of threads) and RAM. If your system has around 2GiB of memory per thread (e.g. 8 threads with 16GiB of RAM, 16 threads with 32GiB of RAM, etc.) then I’d recommend starting with a pagefile size equal to 50% of your RAM and then increase it in increments until you find the minimum value that works. If your system only has 1GiB of RAM per thread then I’d start with a pagefile size equal to 100% of your RAM and increment from there.

It’s also important to remember that updating the pagefile size requires a system reboot to take effect, so simply changing the values without rebooting the host system (or VM) will have no effect whatsoever.

0reactions
dskvrcommented, Jul 4, 2020

Is there a suggested pagefile size to start at?

I’ve been using a 16gb pagefile and still unable to get a windows build while excluding both debug and templates

$Pagefile = Get-WmiObject Win32_PagefileSetting | Where-Object {$_.name -eq "C:\pagefile.sys"}
$Pagefile.InitialSize = 16384
$Pagefile.MaximumSize = 16384
$Pagefile.put()
Read more comments on GitHub >

github_iconTop Results From Across the Web

fatal error c1060, the compiler is out of heap space
If the /Zm option is already set, try removing it. Heap space might be exhausted because the memory allocation limit specified in the...
Read more >
Fatal Error C1060
In this article. compiler is out of heap space. The operating system or run-time library cannot fill a request for memory.
Read more >
C++ compiler is out of heap space - Visual Studio Feedback
Compiling the last line with 64 bit cl.exe, it eats up all system memory in 10 seconds. And the computer does hardly respond...
Read more >
[Solved] Compiler is out of heap space
Try turning off the /MP option in cMake -- you can blow through a lot of RAM if Visual Studio decides to spawn...
Read more >
fatal error C1060: compiler is out of heap space · Issue #742
I used to see this error when compiling some .cpp files that, when including many header files, would become very large. Essentially, the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found