

            dsinit (2) --- initialize dynamic storage space          03/25/82


            _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n

                 subroutine dsinit (w)
                 integer w

                 Library:  vswtlb (standard Subsystem library)


            _F_u_n_c_t_i_o_n

                 'Dsinit'  initializes an area of storage in the common block
                 DS$MEM so that the routines 'dsget' and 'dsfree' can be used
                 for dynamic storage allocation.  The memory  to  be  managed
                 must  be  supplied  by  the user, by two declarations of the
                 form:

                    integer mem (MEMSIZE)
                    common /ds$mem/ mem

                 or  the  "DS_DECL"  system  macro  can  be  used   for   the
                 declarations as follows:

                    DS_DECL (mem, MEMSIZE)

                 The  memory  size (supplied by the user) must then be passed
                 to 'dsinit' as its argument:

                    call dsinit (MEMSIZE)


            _I_m_p_l_e_m_e_n_t_a_t_i_o_n

                 'Dsinit' sets up an available space list consisting  of  two
                 blocks,  the  first  empty  and  the  second  containing all
                 remaining memory.  The  first  word  of  memory  (below  the
                 available  space  list)  is set to the total size of memory;
                 this information is used only by the dump routines  'dsdump'
                 and 'dsdbiu'.


            _C_a_l_l_s

                 error


            _S_e_e _A_l_s_o

                 dsget (2), dsfree (2), dsdump (2), dsdbiu (6)










            dsinit (2)                    - 1 -                    dsinit (2)


