Re: GCC 4.8 out of memory

Frank Wille <[email protected]>
Newsgroups gmane.os.netbsd.ports.m68k
Organization Privates Internet Ostwestfalen/Lippe e.V.
Message-ID <[email protected]>
Christos Zoulas wrote:

>> On my Amiga with 68060, 136MB RAM and 512MB swap I'm getting
>> "-sh: /usr/libexec/cc1: not enough memory"
>> whenever I try to compile a source or when I call /usr/libexec/cc1
>> directly.
>>
>> 7.0beta from January/February with GCC 4.5 had no problem.
>
> Is this because of default resource limits or default text/data size?

Not sure. How can I determine how much memory a process will allocate after
loading into memory and resolving all dynamic link library references?

sysctl:
---8<---
[...]
proc.curproc.rlimit.filesize.soft = unlimited
proc.curproc.rlimit.filesize.hard = unlimited
proc.curproc.rlimit.datasize.soft = 33554432
proc.curproc.rlimit.datasize.hard = 134217728
proc.curproc.rlimit.stacksize.soft = 2097152
proc.curproc.rlimit.stacksize.hard = 33554432
proc.curproc.rlimit.coredumpsize.soft = unlimited
proc.curproc.rlimit.coredumpsize.hard = unlimited
proc.curproc.rlimit.memoryuse.soft = 136052736
proc.curproc.rlimit.memoryuse.hard = 136052736
proc.curproc.rlimit.memorylocked.soft = 45350912
proc.curproc.rlimit.memorylocked.hard = 136052736
[...]
---8<---

amiga/include/vmparam.h has just 6MB for MAXTSIZ. 128MB for MAXDSIZ and 32MB
for MAXSSIZ.

The size of cc1's text segment seems larger than 6MB:

---8<---
/usr/libexec/cc1:     file format elf32-m68k

Program Header:
    PHDR off    0x00000034 vaddr 0x00002034 paddr 0x00002034 align 2**2
         filesz 0x000000e0 memsz 0x000000e0 flags r-x
  INTERP off    0x00000114 vaddr 0x00002114 paddr 0x00002114 align 2**0
         filesz 0x00000017 memsz 0x00000017 flags r--
    LOAD off    0x00000000 vaddr 0x00002000 paddr 0x00002000 align 2**13
         filesz 0x00626f4d memsz 0x00626f4d flags r-x
    LOAD off    0x00626f50 vaddr 0x0062af50 paddr 0x0062af50 align 2**13
         filesz 0x0006c8cc memsz 0x0009cfcc flags rw-
[...]
---8<---

Is this the reason? Then Amiga is the only affected port, besides Sun2
(2MB). Maybe I should go to 16MB like Atari did.

-- 
Frank Wille
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.