This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: libstdc++ test suite still drives machine into swap
- To: zackw at stanford dot edu
- Subject: Re: libstdc++ test suite still drives machine into swap
- From: Wolfram Gloger <Wolfram dot Gloger at dent dot med dot uni-muenchen dot de>
- Date: Wed, 27 Jun 2001 12:10:26 +0200 (MDT)
- CC: gcc at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- References: <20010626195712.P2274@stanford.edu>
Hello,
> The libstdc++ test suite still drives my machine, which has plenty of
> RAM thank you, into swap. I suspect this is because ulimit -d does
> not actually work on Linux, because libc allocates huge blocks with
> anonymous mmap, and anonymous mmap ignores that particular limit.
Yes, so if you want to limit RAM usage, why not just use 'ulimit -v'?
> What actually happens is that execution never gets past the
> std::string constructor. Malloc lies. It gives you a pointer to
> memory that does not exist, on the theory that you won't *really* use
> all of it.
Actuallly, I think it's more accurate to state that the kernel lies.
But we all like over-commitment, don't we..
> The *only* way you can test std::bad_alloc reliably is to override
> libc malloc with something that fails on huge requests. Resource
> limits are not sufficient.
I believe they are, 'ulimit -v' works for me. Of course there may
also be other solutions.
Regards,
Wolfram.