views:

64

answers:

1

Hello,

I am trying to build a solution for windows XP in Visual Studio 2005. This solution contains 81 projects (static libs, exe's, dlls) and is being successfully used by our partners. I copied the solution bundle from their repository and tried setting it up on 3 similar machines of people in our group. I was successful on two machines and the solution failed to build on my machine.

The build on my machine encountered two problems:

  1. During a simple build creation of the biggest static library (about 522Mb in debug mode) would fail with the message "13>libd\ui1d.lib : fatal error LNK1106: invalid file or disk full: cannot seek to 0x20101879"

  2. Full solution rebuild creates this library, however when it comes to linking the library to main .exe file, devenv.exe spawns link.exe which consumes about 80Mb of physical memory and 250MB of virtual and spawns another link.exe, which does the same. This goes on until the system runs out of memory. On PCs of my colleagues where successful build could be performed, there is only one link.exe process which uses all the memory required for linking (about 500Mb physical).

There is a plenty of hard drive space on my machine and the file system is NTFS.

All three of our systems are similar - Core2Quad processors, 4Gb of RAM, Windows XP SP3. We are using Visual studio installed from the same source.

I tried using a different RAM and CPU, using dedicated graphics adapter to eliminate possibility of video memory sharing influencing the build, putting solution files to different location, using different versions of VS 2005 (Professional, Standard and Team Suite), changing the amount of available virtual memory, running memtest86 and building the project from scratch (i.e. a clean bundle).

I have read what MSDN says about LNK1106, none of the cases apply to me except for maybe "out of heap space", however I am not sure how I should fight this.

The only idea that I have left is reinstalling the OS, however I am not sure that it would help and I am not sure that my situation wouldn't repeat itself on a different machine.

Would anyone have any sort of advice for me?

Thanks

+1  A: 

Yes, 522 Megabytes is about as large a contiguous chunk of virtual memory that can be allocated on the 32-bit version of Windows. That's one hunking large library, you'll have to split it up.

You might be able to postpone the inevitable by building on a 64-bit version of Windows, 32-bit programs get a much larger virtual memory space, close to 4 GB.

Hans Passant
Could you please explain this a bit? I thought that 4GB was the size of a biggest continuous chunk of memory that can be allocated on a 32-bit Windows. Am I wrong?
Corvin
@Corvin: 4GB is the full 32-bit address space size. The operating system and memory-mapped devices get the top half. Bottom half is available to any user program but contains a mix of code and data. Memory is allocated from the unmapped spaces between.
Hans Passant