Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!ut-sally!husc6!yale!leichter From: leichter@yale.UUCP (Jerry Leichter) Newsgroups: comp.lang.c Subject: Re: portability and standards Message-ID: <13515@yale-celray.yale.UUCP> Date: Sat, 11-Jul-87 17:19:52 EDT Article-I.D.: yale-cel.13515 Posted: Sat Jul 11 17:19:52 1987 Date-Received: Sun, 12-Jul-87 16:48:10 EDT References: <8113@brl-adm.ARPA> <1057@rtech.UUCP> Reply-To: leichter@yale-celray.UUCP (Jerry Leichter) Organization: Yale University Computer Science Dept, New Haven CT Lines: 15 In article <1057@rtech.UUCP> wong@llama.UUCP (J. Wong) writes: >Although this is "safe" and "proper", it is not space efficient. The DEC C >implementation allocates all global variables separately, each in a separate >PSECT. Since a PSECT is a page, this results in a lot of wasted space. In >addition, if you happen to have a declaration that is not used, it still >forces the definition to be linked into the image. > The above comment is nonsense. PSECT's can be any size; the alignment they are forced to can be set to anything from a byte to a page. Data PSECT's produced for C extern's are given the alignment appropriate for the data they contain. Starting with V2.3 of VAX C, you can even specify the alignment you want (with the VAX C-specific _align storage class modifier). -- Jerry