RWS_$INTRO Domain/OS RWS_$INTRO
NAME
intro - dynamic storage allocation
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/rws.h>
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/rws.ins.pas';
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/rws.ins.ftn'
DESCRIPTION
The rws_$ calls allow programs to allocate storage dynamically.
The following is a list of the rws_$ calls.
rws_$alloc allocate storage
rws_$alloc_heap_pool allocate heap storage
rws_$alloc_rw_pool allocate read/write storage from a pool
rws_$release_heap_pool release heap storage
There are two types of storage supported by the system. "Heap storage"
can be allocated and released by user processes, whereas "read/write
storage" can only be allocated by a user process and is released only
when the allocating process terminates. Heap storage allows more control
over storage, but requires slightly more system overhead to maintain.
Data Types
rws_$pool_t
An enumerated type for specifying the type of storage to allocate.
It can assume one of the following values:
rws_$std_pool
Storage allocated from the standard pool is private to the
allocating process and is released during a UNIX exec(2) call.
A pointer to storage allocated from the standard pool is not
valid in another process.
rws_$stream_tm_pool
Storage allocated from the stream pool is private to the allo-
cating process and is retained across a UNIX exec(2) call. A
pointer to storage allocated from the standard pool is not
valid in another process.
rws_$global_pool
Storage allocated from the global pool is available to all
processes running on a single node. A pointer to storage allo-
cated from the global pool may be used by all local processes
to access a common storage area.
Errors
rws_$bad_free
Attempted to free storage allocated from a different pool.
rws_$level_failure
Program level information was corrupted by a user process.
rws_$non_existent_pool
Invalid pool specified.
rws_$no_space
Not enough address space or disk space.
rws_$not_heap_entry
Argument to rws_$release_heap did not refer to storage allocated
with rws_$alloc_heap.
rws_$scribbled_over
Heap process information was corrupted by a user process.
rws_$wrong_level
Attempted to release standard or stream pool storage that was allo-
cated by a program at a lower program level.