[comp.lang.c] HELP: _BSS : segment/group exceeds 64k

s234@brems.ii.uib.no (Thor Hovden) (06/20/91)

On compiling a good deal of source code, I got this error which I do not
quite understand;

  _BSS : segment/group exceeds 64k

The source has previously been compiled flawless on a UNIX system, but
now as I try to compile it with Turbo C on a MSDOS, it fails.  The code
is pretty generic.

I believe it has something to do with the memory model, and has tried
compiling with LARGE memory model, but it fails.

Any ideas?
____
 /  /-/    Thor Hovden                            internet: s234@brems.ii.uib.no

etxmesa@eos.ericsson.se (Michael Salmon) (06/20/91)

In article <1991Jun19.210227.18998@eik.ii.uib.no>, Thor Hovden writes:
> On compiling a good deal of source code, I got this error which I do not
> quite understand;
> 
>   _BSS : segment/group exceeds 64k
> 
> The source has previously been compiled flawless on a UNIX system, but
> now as I try to compile it with Turbo C on a MSDOS, it fails.  The code
> is pretty generic.
> 
> I believe it has something to do with the memory model, and has tried
> compiling with LARGE memory model, but it fails.

Try compiling it with the huge model, it still may fail but there at least 
every file (I think) has its own segment.

Michael Salmon
L.M.Ericsson
Stockholm

Standard disclaimer.

jos@and.nl (J. Horsmeier) (06/20/91)

In article <1991Jun19.210227.18998@eik.ii.uib.no> s234@brems.ii.uib.no (Thor Hovden) writes:
>On compiling a good deal of source code, I got this error which I do not
>quite understand;
>
>  _BSS : segment/group exceeds 64k
>I believe it has something to do with the memory model, and has tried
>compiling with LARGE memory model, but it fails.
>
>Any ideas?

Remove as much as you can from your global data stuff (large arrays etc.). 
You'll have to live with this on a PC running MessDOS. Your default data
segment can only be as large as 64K 8-(

malloc the stuff instead.

Our Sun is not the on the only start in the universe,
Our planet is not the only planet spinning around a start in the universe,
Our planet is not the only planet with `intelligent' life forms on it,
Our planet *IS* the only planet in the universe using MessDOS.

Jos

|O   J.A. Horsmeier AND Software B.V.        phone : +31 10 4367100   O|
|O                  Westersingel 106/108     fax   : +31 10 4367110   O|
|O                  3015 LD  Rotterdam NL    e-mail: jos@and.nl       O|

bob@taumet.com (Robert Francis Brewin) (06/20/91)

_BSS is the designation for that area of memory which holds uninitialized
data.  Unfortunately, this segment is part of a larger "group", typically
known as DGROUP ( on DOS machines at least. ).  DGROUP is limited in size
to 64k, and thus this limits any data in _BSS to 64k.  I have never tried
it, but if you try compiling the same program using BC++ and use the HUGE
model, this may solve your problem.  If that doesn't work, you will have
to modify your code so that "somehow" some of the data which is in _BSS
gets allocated on the heap instead.