Mail Archives: djgpp/1995/11/30/16:53:54
On Thu, 30 Nov 1995, Eli Zaretskii wrote:
>
> On Tue, 28 Nov 1995, Quantum Porcupine wrote:
>
> > > I have a generic function which has as one of its input parameters an int
> > > which identifies an array size. Within the function, I attempt to declare
> > > an array of int's:
> > >
> > > int item_count [array_size];
> > >
> > > where array_size is the input parameter. When I look at the array in the
> > > debugger (gdb) however, what i see is an array of int pointers (I think)
> > > - something like int (*) [60000] (the 60000 is approximate). If I
> >
> > That's probably due to the old 64k segment limit imposed by DOS... it's
> > probably just splitting it across many segments like any coder who's
> > worked in realmode (yeah, I know, this is pmode, weird huh?) has done
> > many times...
>
> DJGPP doesn't impose that limit at all. When you call a DOS function
> (like write()) from DJGPP it breaks your data into chunks that DOS can
> grok and feeds them in sequence. Anyway, even this has nothing to do
> with this thread main issue which doesn't involve any DOS calls
> whatsoever.
>
Well, I remember reading something in some DJGPP-specific code which had
a comment like "Stupid compiler won't allocate more than 64k" or
something weird... I thought this was odd, but I haven't done much with
DJGPP anyway. For anyone interested, this was in DEVIL, the Descent
level editor (comes with full source). I know that pmode has no such
segmentation limit, but DJGPP could easily impose it anyway. Of course,
perhaps in an old version of DJGPP it only uses word-sized array sizes
(that could be what the author of DEVIL was referring to), who knows?
________________________________________________________________________
/ Joshua Shagam / (Quantum Porcupine / Versatile) /
/ mailto:JShagam AT nmsu DOT edu / http://web.nmsu.edu/~jshagam /
/ phone://1.505.645.3856/~joshua / for the Quantum Porcupine Archive /
/__________________________________/____________________________________/
Stop the execution of King Louis XIV! If you agr-- oops, too late! :)
- Raw text -