


      SSSSeeeettttDDDDaaaattttaaaaBBBBoooouuuunnnnddddssss((((3333BBBB))))            ((((RRRRiiiiddddggggeeee))))            SSSSeeeettttDDDDaaaattttaaaaBBBBoooouuuunnnnddddssss((((3333BBBB))))



      NNNNAAAAMMMMEEEE
           SetDataBounds - set the maximum stack and heap sizes

      SSSSYYYYNNNNTTTTAAAAXXXX
           PROCEDURE SetDataBounds (desiredStackMax : Integer;
                                    desiredHeapMax : Integer;
                                var resultingStackMax : Integer;
                                var resultingHeapMax : Integer);

      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
           _S_e_t_D_a_t_a_B_o_u_n_d_s sets the maximum sizes of the stack and heap
           areas within the data segment associated with the calling
           command process.

           When a command process is created via the LoadCommand
           routine, its data segment is created with a certain amount
           of secondary storage allocated to the stack and the heap
           areas. The stack area grows upwards from location zero
           (increasing addresses), while the heap area grows downwards
           from the end of the address space (decreasing addresses).

           The default maximum size of both the stack and heap areas is
           32M bytes. Data segment references within the stack or heap
           area bounds will automatically be allocated secondary
           storage to satisfy the references as needed. Data segment
           references outside the stack or heap area bounds cause the
           command process to generate an illegal memory reference
           trap.

           The default maximum sizes may be changed via SetDataBounds,
           where ddddeeeessssiiiirrrreeeeddddSSSSttttaaaacccckkkkMMMMaaaaxxxx and ddddeeeessssiiiirrrreeeeddddHHHHeeeeaaaappppMMMMaaaaxxxx specify the maximum
           sizes in bytes for the stack and heap, respectively. These
           values should be positive numbers, and will be rounded up to
           a multiple of 4096 if necessary. The values
           rrrreeeessssuuuullllttttiiiinnnnggggSSSSttttaaaacccckkkkMMMMaaaaxxxx and rrrreeeessssuuuullllttttiiiinnnnggggHHHHeeeeaaaappppMMMMaaaaxxxx are returned and
           indicate the new maximum stack and heap sizes, respectively.

           The amount of secondary storage space allocated to the data
           segment is not changed by SetDataBounds.

      SSSSEEEEEEEE AAAALLLLSSSSOOOO
           LoadCommand (3B)

      NNNNOOOOTTTTEEEESSSS
           If the desired size is less than the currently allocated
           size, then the maximum size is not changed, and the current
           maximum size is returned.








      Page 1                                                   (9010-E)



