This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ctor_copy_dtor.cc still consuming outrageous amounts of memory


On 28 Jan 2001, Phil Edwards said:
> The plaint wasn't ignored; it had been bugging people for weeks before
> then.

I'd noticed that a chunk of ctor_copy_dtor.cc is commented out because
of memory consumption, and the other half (guilty of the same problem)
is not...

>       There is logic in mkcheck.in to limit the amount of memory used by
> each test, and it was working for a time.  (In fact it worked too well;
> we had to increase the limit to 3MB to get some of the tests to pass.)

Ooops. I'd say something like 16Mb is more sensible; I guess it really
depends on the size and load of the system you're running the tests on.
(Time for a configure option?)

> It's a call to the 'ulimit' builtin.
> 
> For some reason it doesn't seem to be having an effect these days.  I don't
> know why.  And I don't know when it started.  At any rate, I'd rather fix
> the problem than kill the tests.

Agreed! It's just that I didn't get to control-C in time last time and
the machine was killed, so I was a little annoyed ;)

> Which platform are you using?

i586-pc-linux-gnu, 128Mb physical RAM, 520Mb swap of which about 400Mb
was free when ctor_copy_ctor killed things.

I've got it working now. Basically, using `ulimit -d' to limit new'ed
space works only on platforms with a malloc/new implementation that
works by messing with brk() and friends; modern mallocs, like the one in
glibc2 (and therefore most modern news as well) allocate big lumps of
memory by mmap()ing them, and that has to be restricted with `ulimit -v'
instead.

In some respects the current set of Unix limits is showing its age :( on
such a system, there's no easy way to restrict the size of `big *and*
small mallocs' simultaneously :( luckily we only need to restrict big
ones.

-- 
`Anyhow, that pipe dream doesn't say anything about the question you
 asked.  (I am planning for a career in politics.)' --- Mark Mitchell
                                                      on the GCC list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]