Path: utzoo!attcan!uunet!pyrdc!ISIDAPS5!mike From: mike@ISIDAPS5.UUCP (Mike Maloney) Newsgroups: comp.unix.xenix Subject: Re: HELP!!! Summary: Move declaration of p to extern Message-ID: <212@ISIDAPS5.UUCP> Date: 20 Jul 88 18:38:25 GMT References: <5029@ozdaltx.UUCP> Lines: 30 In article <5029@ozdaltx.UUCP>, root@ozdaltx.UUCP (root) writes: > I'm running SCO XENIX 2.2.1 and am trying to compile a > program that contains the following code: > > main() > { > unsigned char p[720][72]; > ; > } > I keep getting the following error message > > test.c > test.c(2) : error 126: auto allocation exceeds 32K Move the declaration of 'p' to outside of the main. It then becomes external rather than automatic. I believe that automatic storage comes from the stack frame when main is entered at run-time. Hence on a 286 system, you're asking for a lot (even when you allocate 52K for the stack with -F). This shouldn't be a problem on 386 systems, because they use a variable stack which can dynamically expand. 386 systems also aren't limited to 64K segments. Good luck. -- Mike Maloney "The nice thing about standards Integral Systems, Inc. is that there are so many to Lanham Maryland choose from" - Murphy