How much can a segment take??

Peter Knight prk at planet.bt.co.uk
Fri Sep 28 17:34:24 AEST 1990


greg at turbo.atl.ga.us (Greg Montgomery) writes:

>I'm using TC++ (actually tcc.exe) and on compiling a program, I keep
>getting the error message : "Segment _TEXT exceeds 64K". I'm using the
>large memory model. Why is this a problem?? I thought the large memory
>model allowed my program to access over 64k??? Any ideas on what is
>causing this and how do I fix it??

The large model of most MS-DOS C compilers can only cope with each
object file (in Turbo's case this may not be written to disk, so strictly
isn't a file....) being less than 64K.  To make bigger programs, you need
to compile bits of the code seperately, and then link them together to form
your completed program, which may be greater than 64k.  Try reading the 
Microsoft C compiler documentation, if you can get hold of it. 

Peter Knight
BT Research

#include <std.disclaimer>



More information about the Comp.lang.c mailing list