* [TUHS] Maximum Array Sizes in 16 bit C
@ 2024-09-18 21:09 Henry Bent
0 siblings, 0 replies; only message in thread
From: Henry Bent @ 2024-09-18 21:09 UTC (permalink / raw)
To: The Eunuchs Hysterical Society
[-- Attachment #1: Type: text/plain, Size: 1440 bytes --]
Hello all,
I know that this isn't strictly a "UNIX history" question, but as I am
working with historic UNIX and this list contains a great number of people
who were instrumental in its development, I figured it would be appropriate
to ask here. If there's a better place for these sorts of questions,
please let me know.
I'm trying to figure out how the array size limits are set in the 2.11BSD
pcc compiler. I've looked through quite a bit of documentation but I don't
see anything that describes this. In theory on a 16 bit system I would
think that the maximum array size would be 64K, but the actual limit that I
found through trial and error is (2^15)-1.
Declaring an array that is too large results in an error of "Constant
required", which is being produced by c01.c in conexp().
https://www.tuhs.org/cgi-bin/utree.pl?file=2.11BSD/src/lib/ccom/c01.c
I did quite a bit of searching through the source but I was not able to
determine where this limit is being set. This is where my usual tools fall
apart. Normally since I have the source I would compile the program I want
with debugging turned on, and then do a backtrace so that I could see how
we got to conexp(). But as far as I can tell I can't get a backtrace,
since there is no option for debugging information in pcc; adb can only
tell me where a process stopped.
I would appreciate any enlightenment or pointers to other documentation.
Thanks in advance!
-Henry
[-- Attachment #2: Type: text/html, Size: 1761 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-18 21:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-18 21:09 [TUHS] Maximum Array Sizes in 16 bit C Henry Bent
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).