Guardian Programming Reference Summary for C

Functions Summary (R-Z)
Guardian Programming Reference Summary for C522630-001
8-6
REFPARAM_BOUNDSCHECK_
Checks the validity of parameter addresses passed to the procedure that calls it. Bounds
checking performed by the system is enough for most applications. This procedure,
however, provides additional checks for those few applications that might need it.
Primarily, REFPARAM_BOUNDSCHECK_ verifies that a specified memory area is
valid for a specified type of access (read only or read/write). Optionally, it also verifies
that the specified memory area does not overlap the part of the process stack occupied
by the calling procedure and any of the procedures it calls.
return value:
Note. This procedure is declared only in the EXTDECS0 file.
#include <cextdecs(REFPARAM_BOUNDSCHECK_)>
short REFPARAM_BOUNDSCHECK_ ( void _far *start-address/* i */
,long area-len /* i */
,void _far *framestart /* i */
,short flags ) /* i */
0 = No error. The procedure successfully executed; the specified memory area is in
bounds. See “Considerations” for a discussion of what it means to be in
bounds.
1 = The specified memory area is out of bounds. Accessing the area might cause an
addressing trap or system-generated nondeferrable signal.
2 = The address is in a read-only area and the check was made for read/write access.
The effect of attempting to write to the area depends on whether your process is
a TNS/R native process or a TNS process: for a TNS/R native process, the
system might deliver a nondeferrable signal to the process; for a TNS process,
the write operation might not take effect.
3 = The address area is in bounds in an extensible segment, but disk space for the
extensible segment could not be allocated. If you try to write to this area, the
effect depends on whether your process is a TNS process or a TNS/R native
process: a TNS process might terminate with a “no memory available” trap (trap
12); a TNS/R native process might receive a SIGNOMEM signal.
4=The start-address parameter points to a location on the TOSSTACK but
the calling procedure is not executing on the TOSSTACK. This error can occur
only on a TNS processor.
5 = An absolute address was supplied in start-address for a TNS/R native
process and flags.<14> was not set to allow this.