Boost logo

Boost Users :

From: Louis Lavery (Louis_at_[hidden])
Date: 2002-05-20 06:37:00


----- Original Message -----
From: Chris Russell <cdr_at_[hidden]>
To: <Boost-Users_at_[hidden]>
Sent: Sunday, 19 May, 2002 5:34 AM
Subject: Re: [Boost-Users] adjacency_list.cpp

> Louis - you may already be aware of the MSVC 6.0 compiler switch /Zm that
> increases the width of heap stripes allocated to each of several threads
> spawned by the compiler. This is a _course_ and crude mechanism that
> _sometimes_ will get MSVC 6.0 to compile complicated templated code. The
> internal compiler error emitted just prior to the compiler giving up is
> pretty non-descript. Sometimes you're trying to compile more modern C++
than
> MSVC can handle, and sometimes the compiler is just running out of heap on
> one or more of its threads. In any case, /Zm is worth a try. (Note: it's
my
> understanding the MSVC allocates heap to each of its compiler threads once
> and should a thread run out of memory, an internal compiler error occurs
> without any reasonable explanation. There is no dynamic re-allocation of
> heap if a thread runs short of memory. As there is more than one way to
get
> MSVC 6.0 into "internal compiler error" territory, there is no guarantee
> that /Zm will help you. However, it will not hurt you and I typically add
> this switch to every MSVC project by hand).
>
> Note that MSVC 6.0 /Zm does not work the same way on NT/2000/XP as it does
> on prior versions of Windows. Because of the way memory is allocated in
the
> older Windows versions, /Zm infrequently is any help at all if you're
> building on a Win9x machine (clearing throat). So use something with an NT
> kernel and throw /Zm1000 in your compiler options list and see what
happens
> should you run into more problems. The docs on /Zm are sketchy to
> non-existent. There has been some useful discussion about this subject
> related to compiling templated code on the Windows Template Library
> developers list on Yahoo Groups.
>
> Try this link for some additional information on /Zm:
>
> http://groups.yahoo.com/group/wtl/messagesearch?query=%2FZm
>
> Hope this is useful.

Thanks for the tip. I'll keep it in mind for future use.

It turns out that what I said is something of a red herring (or
complete cobblers, if I'm being honest). I started from scratch
to find out the minimum I need to do to build adjacency_list.cpp.
All I need do is use Z7 instead of ZI and disable precompiled
headers.

Just to complete the picture, I'm using MSVC6 (sp3) on NT.

Thanks again,

Louis.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net