Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Mar 2002 04:03:01 -0700 (MST)
From:      Jason Barnes <jbarnes@c3po.lpl.arizona.edu>
To:        freebsd-questions@freebsd.org
Cc:        rbeyer@lpl.arizona.edu, Wayne Barnes <wayne@barnes1.wustl.edu>
Subject:   out of memory, but there's plenty left!
Message-ID:  <20020301035644.E11194-100000@c3po.lpl.arizona.edu>

next in thread | raw e-mail | index | archive | help

	I'm running into a problem with my g++ code running out of memory
that might or might not be FreeBSD's fault.  The program says, "out of
memory" and dumps core when it gets to about 512MB in size, but there is
plenty of RAM and swap space left.  Here is the output from 'top' just
before it crashes:


last pid:   154;  load averages:  0.66,  0.21,  0.08  up 0+00:02:47    03:55:28
26 processes:  2 running, 24 sleeping
Mem: 485M Active, 13M Inact, 45M Wired, 304K Cache, 61M Buf, 459M Free
Swap: 5120M Total, 5120M Free

  PID USERNAME PRI NICE  SIZE    RES STATE    TIME   WCPU    CPU COMMAND
  144 jbarnes   47   0   490M   483M RUN      1:04 93.29% 91.41% mosaicer
  154 jbarnes   34   0  1896K  1036K RUN      0:00 11.00%  0.54% top
   73 root       2   0  2216K  1592K select   0:00  0.00%  0.00% sshd
   91 root       2   0   904K   508K select   0:00  0.00%  0.00% moused
  136 jbarnes   18   0  1316K   952K pause    0:00  0.00%  0.00% tcsh
   62 root       2   0   940K   644K select   0:00  0.00%  0.00% syslogd
  112 root       2   0  2076K  1724K select   0:00  0.00%  0.00% httpd
  148 jbarnes   18   0  1312K   944K pause    0:00  0.00%  0.00% tcsh
  124 root      10   0  1196K   880K wait     0:00  0.00%  0.00% login
  123 root      10   0  1196K   880K wait     0:00  0.00%  0.00% login
   77 root       2   0  2504K  2024K select   0:00  0.00%  0.00% sendmail
  126 root       3   0   948K   644K ttyin    0:00  0.00%  0.00% getty
   69 root       2   0  1056K   776K select   0:00  0.00%  0.00% inetd
  129 root       3   0   948K   644K ttyin    0:00  0.00%  0.00% getty
  125 root       3   0   948K   644K ttyin    0:00  0.00%  0.00% getty
  130 root       3   0   948K   644K ttyin    0:00  0.00%  0.00% getty
  127 root       3   0   948K   644K ttyin    0:00  0.00%  0.00% getty
   71 root      10   0   972K   712K nanslp   0:00  0.00%  0.00% cron



	I am fairly certain that the program is NOT simply running away
and asking for 12GB of RAM at this point in the program because I have
been tweaking it, trying to get it to use less memory and as I have done
so it crashes at later and later points in the program (thus implying an
incremental memory request is sinking the code).
	Is this an operating system related issue?  I am running
FreeBSD-4.5-RELEASE.  Thanks in advance for any light you may be able to
shed on the issue!

				- Jason


****  Jason Wayne Barnes  ****  -- "Active on the internet."  ****


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020301035644.E11194-100000>