virtual memory exhausted

We’re trying to compile a program using c++ and we’re getting the following
error message:

cpp: virtual memory exhausted

I’ve used swapctl to increase our /.swapfile to 1GB and while the
compilation is going on I keep looking at the status of the swap and I’m
not sure that we’re actually running out swap space.

Here is the output of the last swapctl just before the compilation aborted:

swapctl

Swap stats:
swap space size: 1073737728
swap space in use: 0
number of pages swapped out: 1900544
number of pages swapped in: 0
number of pages deleted from swap: 796029813

swapctl

sh: cannot fork - try again

Any suggestions how to get this sucker compiled? (It’s ballista, the
robustness testing software)

Thanks,

Dana


Dana Echtner \ Real-Time Systems Administrator
dana@ece.concordia.ca / ECE, Concordia University, Montreal, Canada

rw-rw-rw-: The file protection of the beast

I don’t know about the virtual memory, but I encounted a huge memory usage
when compiling some C++ code with optimization. You might want to try not to
use optimization.
Markus

“Dana Echtner” <dana@ece.concordia.ca> wrote in message
news:9kpbag$bui$1@inn.qnx.com

We’re trying to compile a program using c++ and we’re getting the
following
error message:

cpp: virtual memory exhausted

I’ve used swapctl to increase our /.swapfile to 1GB and while the
compilation is going on I keep looking at the status of the swap and I’m
not sure that we’re actually running out swap space.

Here is the output of the last swapctl just before the compilation
aborted:

swapctl

Swap stats:
swap space size: 1073737728
swap space in use: 0
number of pages swapped out: 1900544
number of pages swapped in: 0
number of pages deleted from swap: 796029813

swapctl

sh: cannot fork - try again

Any suggestions how to get this sucker compiled? (It’s ballista, the
robustness testing software)

Thanks,

Dana


Dana Echtner \ Real-Time Systems Administrator
dana@ece.concordia.ca > / ECE, Concordia University, Montreal, Canada

rw-rw-rw-: The file protection of the beast

Markus Loffler wrote:

I don’t know about the virtual memory, but I encounted a huge memory usage
when compiling some C++ code with optimization. You might want to try not
to use optimization.

I don’t think I’m using optimization, the command line is as follows:

g++ -DB_SELFHOST -ldl -lnsl -lposix4 ballista.cpp match.o line.o hack.o
ballistaRPC.o ballistaXDR.o selfHost.o ballistaUtil.o marshal.o
testCaseIterator.o serverCommunication.o parseArguments.o ballistaError.o
-o ballista

It’s a lot of source code, but with a swap partition of 1GB, I don’t see
why it should run out of memory.

I’ve also checked for any limits imposed by the shell and there is nothing

\

ulimit -a

time(cpu-seconds) unlimited
file(blocks) unlimited
coredump(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) unlimited
lockedmem(kbytes) unlimited
memory(kbytes) unlimited
nofiles(descriptors) 1000
processes unlimited
vmemory(kbytes) unlimited

Thanks!

Dana

\

Dana Echtner \ Real-Time Systems Administrator
dana@ece.concordia.ca / ECE, Concordia University, Montreal, Canada

rw-rw-rw-: The file protection of the beast

Dana Echtner <dana@ece.concordia.ca> wrote:

We’re trying to compile a program using c++ and we’re getting the following
error message:

cpp: virtual memory exhausted

Are you using 6.0 or 6.1? The ld in 6.0 slipped out without the
required munlock() call (so it could use swap).

chris

cdm@qnx.com > “The faster I go, the behinder I get.”

Chris McKillop – Lewis Carroll –
Software Engineer, QSSL
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Dana Echtner <dana@ece.concordia.ca> wrote:
: Markus Loffler wrote:

:> I don’t know about the virtual memory, but I encounted a huge memory usage
:> when compiling some C++ code with optimization. You might want to try not
:> to use optimization.
:
: I don’t think I’m using optimization, the command line is as follows:

: g++ -DB_SELFHOST -ldl -lnsl -lposix4 ballista.cpp match.o line.o hack.o
^^^^^^^^^^^^^^^^^^^^

This looks like a cut and paste from a Solaris box.
QNX does not have Network Service Library (nsl)

Maybe you were in the wrong window(xterm).

: ballistaRPC.o ballistaXDR.o selfHost.o ballistaUtil.o marshal.o
: testCaseIterator.o serverCommunication.o parseArguments.o ballistaError.o
: -o ballista

: It’s a lot of source code, but with a swap partition of 1GB, I don’t see
: why it should run out of memory.

: I’ve also checked for any limits imposed by the shell and there is nothing


: # ulimit -a
: time(cpu-seconds) unlimited
: file(blocks) unlimited
: coredump(blocks) unlimited
: data(kbytes) unlimited
: stack(kbytes) unlimited
: lockedmem(kbytes) unlimited
: memory(kbytes) unlimited
: nofiles(descriptors) 1000
: processes unlimited
: vmemory(kbytes) unlimited

: Thanks!

: Dana


: –
: Dana Echtner \ Real-Time Systems Administrator
: dana@ece.concordia.ca / ECE, Concordia University, Montreal, Canada
:
: rw-rw-rw-: The file protection of the beast

Alain Magloire wrote:


: g++ -DB_SELFHOST -ldl -lnsl -lposix4 ballista.cpp match.o line.o hack.o
^^^^^^^^^^^^^^^^^^^^

This looks like a cut and paste from a Solaris box.
QNX does not have Network Service Library (nsl)

Maybe you were in the wrong window(xterm).

Uh, I think after half a day of debugging and re-creating swap files and
stuff I would notice.

But it’s still useful information. Perhaps the compile just hasn’t gotten
that far and when we solve the memory problem it will complain about libnsl.

I’ll let the person working with ballista know.

Thanks!

D.


Dana Echtner \ Real-Time Systems Administrator
dana@ece.concordia.ca / ECE, Concordia University, Montreal, Canada

rw-rw-rw-: The file protection of the beast

Chris McKillop wrote:

Are you using 6.0 or 6.1? The ld in 6.0 slipped out without the
required munlock() call (so it could use swap).

Oooh, that sounds like it could be the problem.

I don’t actually know which version of QNX ld is from, but I’ll find out.
(That machine is a bit of mix I think, I’m not sure what the owner did to
it wrt to 6.0 vs. 6.1)

Thanks, I’ll let you know if that’s the problem!

Dana


Dana Echtner \ Real-Time Systems Administrator
dana@ece.concordia.ca / ECE, Concordia University, Montreal, Canada

rw-rw-rw-: The file protection of the beast