[unix-pc.general] problems with gcc - out of virtural memory

todd@ivucsb.sba.ca.us (Todd Day) (10/22/89)

I was running gcc for the first time, compiling the latest version
of NetHack.  Everything was going fine, until it barfed on the
file monster.c, claiming to be out of virtural memory.

I have a 67 MB hard disk, and 3.5 MB memory.  I am running 3.5
(could this be the problem, since gcc was compiled using 3.51?).

iv -tv /dev/rfp000 returns

Winchester disk
Volume Name: WINCHE
1024 Cylinders. 8 Heads per Cylinder.
There are 17 Physical Sectors (of 512 bytes) per Track.
	136 Physical Sectors per Cylinder, 139264 Physical Sectors per Disk.
There are 8 Logical Blocks (of 1024 bytes) per Track.
	64 Logical Blocks per Cylinder, 65536 Logical Blocks per Disk.
The Step Rate supplied to the Controller is 0.
Partition 0: start Track=0, size (in Blocks)=64
Partition 1: start Track=8, size (in Blocks)=5000
Partition 2: start Track=633, size (in Blocks)=60472
Loader starts at Block 2 (size=23 Blocks).
Bad Block Table starts at Block 1 (size=1 Blocks).
[bad block table deleted]

I take it that the blocks they are refering to are 1024 byte blocks.
That means I have 5 MB of swap space.

So what is the problem?  Does gcc really hog that much memory?

-- 
Todd Day  |  todd@ivucsb.sba.ca.us  |  ivucsb!todd@anise.acc.com
"But a machine that was powerful enough to accelerate particles to the grand
 unification energy would have to be as big as the Solar System -- and would
 be unlikely to be funded in the present economic climate." -- Stephen Hawking

baur@venice.SEDD.TRW.COM (Steven L. Baur) (10/22/89)

From article <1989Oct21.174252.16142@ivucsb.sba.ca.us>, by todd@ivucsb.sba.ca.us (Todd Day):
> I was running gcc for the first time, compiling the latest version
> of NetHack.  ...
> So what is the problem?  Does gcc really hog that much memory?
> Todd Day  |  todd@ivucsb.sba.ca.us  |  ivucsb!todd@anise.acc.com


I tried compiling nethack with gcc too, but ran into different problems.
I have a UNIXPC with 2.5MB of ram and a 62MB winchester.  It compiled and
linked (apparently) O.K.
However, when I tried to save/restore levels or arrive on a bones level it
bombed.
I finally used stock cc and that got it running.

How much swap space do you have?

steve
-- 
steve	baur@venice.SEDD.TRW.COM

kevin@kosman.UUCP (Kevin O'Gorman) (10/23/89)

In article <89@venice.SEDD.TRW.COM> baur@venice.SEDD.TRW.COM (Steven L. Baur) writes:
>From article <1989Oct21.174252.16142@ivucsb.sba.ca.us>, by todd@ivucsb.sba.ca.us (Todd Day):
>> I was running gcc for the first time, compiling the latest version
>> of NetHack.  ...
>> So what is the problem?  Does gcc really hog that much memory?
>> Todd Day  |  todd@ivucsb.sba.ca.us  |  ivucsb!todd@anise.acc.com
>
>
>I tried compiling nethack with gcc too, but ran into different problems.
>I have a UNIXPC with 2.5MB of ram and a 62MB winchester.  It compiled and
>linked (apparently) O.K.
>However, when I tried to save/restore levels or arrive on a bones level it
>bombed.
>I finally used stock cc and that got it running.
>
>How much swap space do you have?

Well, I have nethack 3.0 compiled on gcc.  I'm running 2.5 MB in a 3b1 with
System 3.51 and gcc 1.35.  I have a standard "multi-user" swap partition
(6000 blocks, I think).  The only trouble I had was the save/restore problem,
which I tracked down to a crok in as(1)!!!  Seems that gcc in ANSI mode
can put 'const' things in the text partition so that they're memory
protected and shared, but as has a problem with this.  When gcc emits
the 'space' pseudo-op in the text partition, as produces non-zero contents.

This is only a problem for one variable in decl.c, which defines a variable
which it expects to be all zeroes, and which is used to write zeroed
structures as an end-flag in the save-file.

I'm told that gcc 1.36 has this fixed so that it emits explicit data because
of this crok.  Can't blame as too much, because it was never designed for
that sort of thing, but it's annoying anyway.

You can either compile decl.c with -traditional or do the whole shebang
that way to get it compiled with gcc.

todd@ivucsb.sba.ca.us (Todd Day) (10/23/89)

baur@venice.SEDD.TRW.COM (Steven L. Baur) writes:

`I tried compiling nethack with gcc too, but ran into different problems.
`I have a UNIXPC with 2.5MB of ram and a 62MB winchester.  It compiled and
`linked (apparently) O.K.
`However, when I tried to save/restore levels or arrive on a bones level it
`bombed.

I finally got it to work just by rebooting my machine.

`How much swap space do you have?

5 MB

-- 
Todd Day  |  todd@ivucsb.sba.ca.us  |  ivucsb!todd@anise.acc.com
"But a machine that was powerful enough to accelerate particles to the grand
 unification energy would have to be as big as the Solar System -- and would
 be unlikely to be funded in the present economic climate." -- Stephen Hawking

kevin@cfctech.UUCP (Kevin Darcy) (10/29/89)

In article <1004@kosman.UUCP> kevin@kosman.UUCP (Root) writes:
>In article <89@venice.SEDD.TRW.COM> baur@venice.SEDD.TRW.COM (Steven L. Baur) writes:
>>From article <1989Oct21.174252.16142@ivucsb.sba.ca.us>, by todd@ivucsb.sba.ca.us (Todd Day):
>>> I was running gcc for the first time, compiling the latest version
>>> of NetHack.  ...
>>> So what is the problem?  Does gcc really hog that much memory?
>>
>>I tried compiling nethack with gcc too, but ran into different problems.
>>I have a UNIXPC with 2.5MB of ram and a 62MB winchester.  It compiled and
>>linked (apparently) O.K.
>>However, when I tried to save/restore levels or arrive on a bones level it
>>bombed.
>>I finally used stock cc and that got it running.
>>
>The only trouble I had was the save/restore problem,
>which I tracked down to a crok in as(1)!!!  Seems that gcc in ANSI mode
>can put 'const' things in the text partition so that they're memory
>protected and shared, but as has a problem with this.  When gcc emits
>the 'space' pseudo-op in the text partition, as produces non-zero contents.
>

Why, oh why does everybody seem to be swarming to gcc to get NetHack running?
I have NetHack running without anything but the shipped cc, cpp, ccom, as &
ld. It takes just a little light tweaking of options and #includes. I'm not
trying to brag or be close-minded, I'm just curious why people would try to
implement a behemoth like NetHack on shaky PD ground, when it already treads
a fine line with the standard tools. (Make that "almost infinitesimal"
line in the case of stock cpp - is there any way of getting a more robust
version from AT&T?)

Of course, if there are some bona fide added long-term benefits to using the 
GNU stuff, please someone tell me what they are, how to get it easily without 
FTP access, I'll have a try at implementing it myself, then try and convince 
the NetHack development team that they can't live without supporting it...

------------------------------------------------------------------------------
kevin@cfctech.UUCP 			| Kevin Darcy, Asst. Unix Systems Admin.
kevin%cfctech.uucp@mailgw.cc.umich.edu  | Chrysler Financial Corp.
...[mailrus!]sharkey!cfctech!kevin      | MIS, Technical Services
Voice: +1 313 948 4863                  | 27777 Franklin, Southfield, MI 48034
------------------------------------------------------------------------------