Questions about DGROUP

PSS ID Number:  Q11640
Article last modified on 02-19-1988

3.30 
XENIX
enduser | 
Question:
   I have the following questions?
   1. What metacommands are set by default?
   2. What is placed in DGROUP?
   3. Does using the $LARGE command make any difference?
   4. Can $STORAGE:2 be used on specific integers or does it effect
the whole program?
   5. Also, the default data segment contains a stack segment for DOS
compatibility. Can this be removed to create more room?
   6. Finally, for HEAP management does FORTRAN use the DGROUP heap or
one within XENIX. 

Response:
   The answers to your questions are as follows:
   1. Read Section 6.2 "Metacommand Directory" in the XENIX FORTRAN
reference manual. After each metacommand is described, the default
value is described. There is no table available that describes the
default values. 
   2. Read Section 7.2 "The Microsoft FORTRAN Memory Model for XENIX"
in the XENIX FORTRAN user's guide. See Figure 7.1 "Memory Model" on
Page 73 for a table describing DGROUP, and Table 7.1 "DGROUP Segments"
on Page 75 for the contents of each segment. 
   3.  As it says in Section 6.2.6 "The $LARGE and $NOTLARGE
Metacommands", $LARGE is "supplied for use on systems whose memory
model makes programs more efficient if the compiler can assume that
both the size of arrays and the total amount of non-COMMON data is
restricted."  Apparently, you are not using one of those systems where
$LARGE gives you any advantage.  
   4. The $STORAGE metacommand affects the entire source file.
   5. This occurs because you can compile programs on XENIX for use
under DOS. This stack segment should be empty and so should not take
up any space. 
   6. The XENIX FORTRAN compiler now uses the C memory model. If you
look at the segment names (see Page 73 of the user's guide, and Pages
160-161 in Section 8.1.1 "Segment model" of the DOS C user's guide) C
and FORTRAN share the same segment names. However, in the C memory
model the heap is used for dynamic allocation of memory, and since
FORTRAN does not do dynamic memory allocation, there is no such heap.
Uninitialized data is contained in the _BSS DGROUP segment. 