Specifications
Operating System Routines
EXE$ALLOCBUF, EXE$ALLOCIRP
EXE$ALLOCBUF, EXE$ALLOCIRP
Allocates a buffer from nonpaged pool for a buffered-I/O operation.
Module
MEMORYALC
Input
Location Contents
R1 Size of requested buffer in bytes (EXE$ALLOCBUF
only). This value should include the 12 bytes
required to store header information.
PCB$L_STS PCB$V_SSRWAIT clear if the process should wait if
no memory is available for requested buffer; set if
resource wait mode is disabled.
Output
Location Contents
R0 SS$_NORMAL or SS$_INSFMEM.
R1 Size of requested buffer in bytes (IRP$C_LENGTH
for EXE$ALLOCIRP).
R2 Address of allocated buffer.
R4 See the following discussion.
IRP$W_SIZE (in allocated
buffer)
Size of requested buffer in bytes (for
EXE$ALLOCBUF), IRP$C_LENGTH (for
EXE$ALLOCIRP).
IRP$B_TYPE (in allocated
buffer)
DYN$C_BUFIO (for EXE$ALLOCBUF), DYN$C_
IRP (for EXE$ALLOCIRP).
Synchronization
EXE$ALLOCBUF and EXE$ALLOCIRP set IPL to IPL$_ASTDEL. As a result
they cannot be called by code executing above IPL$_ASTDEL. They return control
to the caller at IPL$_ASTDEL.
Description
EXE$ALLOCBUF attempts to allocate a buffer of the requested size from
nonpaged pool; EXE$ALLOCIRP attempts to allocate an IRP from nonpaged pool.
If sufficient memory is not available, EXE$ALLOCBUF and EXE$ALLOCIRP
move the current PCB (CTL$GL_PCB) into R4 to determine whether the process
has resource wait mode enabled. If PCB$V_SSRWAIT in PCB$L_STS is clear,
these routines place the process in a resource wait state until memory is released.
3–14