This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: *bsd & darwin support in libiberty/physmem.c

Actually I looked at the wrong place for my max memory usage:
datasize 65536 kbytes
RLIMIT_DATA The maximum size (in bytes) of the data segment for a
process; this defines how far a program may extend its
break with the sbrk(2) system call.
For some reason this looks like the limit.

Andrew Pinski

On Saturday, Feb 22, 2003, at 09:07 US/Pacific, Andrew Pinski wrote:

Except since this does not take into account the soft limits, I have a bootstrap failure:
stage1/xgcc -Bstage1/ -B/home/gates/pinskia/openbsd/i686-unknown-openbsd3.1/bin/ -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Ws
trict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -fno-common -Werror -DHAVE_CONFIG_H -I. -I. -I/hom
e/gates/pinskia/src/gnu/gcc/src/gcc -I/home/gates/pinskia/src/gnu/gcc/src/gcc/. -I/home/gates/pinskia/src/gnu/gcc/src/gcc/config -I/
home/gates/pinskia/src/gnu/gcc/src/gcc/../include /home/gates/pinskia/src/gnu/gcc/src/gcc/expr.c -o expr.o

cc1: out of memory allocating 65536 bytes after a total of 66253256 bytes

Because my memory usage limit is less than what gets reported: memoryuse 478424 kbytes

You can use getrlimit with RLIMIT_RSS.

from `openbsd''s man page:
RLIMIT_RSS The maximum size (in bytes) to which a process's resident
set size may grow. This imposes a limit on the amount of
physical memory to be given to a process; if memory is
tight, the system will prefer to take memory from pro-
cesses that are exceeding their declared resident set

Thanks, Andrew Pinski

On Saturday, Feb 22, 2003, at 08:47 US/Pacific, Andrew Pinski wrote:

On ix86--unknown-openbsd3.1, I now get total=511.226562Mb avail=510.750000Mb which is right.

Andrew Pinski
apinski at apple dot com
pinskia at physics dot uc dot edu

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