CBL_ALLOC_THREAD_MEM

Allocates thread-specific heap memory.

Syntax:

call "CBL_ALLOC_THREAD_MEM" using      mem-pointer
                            by value  mem-size
                            by value  flags
                            returning status-code

Parameters:

  Using call prototype (see Key) Picture
mem-pointer cblt-pointer usage pointer. Must be level 01.
mem-size cblt-os-size pic x(4) comp-5

or

pic x(8) comp-5 (64-bit native programs only)

flags cblt-os-flags pic x(4) comp-5

or

pic x(8) comp-5 (64-bit native programs only)

status-code See Library Routines - Key  

On Entry:

mem-size
The number of bytes of memory to allocate.
flags
Bits 0-1 Reserved. Must be set to 0.
Bit 2 Allocate this memory independently from any calling program.
Remaining bits Reserved. Must be set to 0.

On Exit:

mem-pointer
A pointer to the memory allocated. The allocated memory is not initialized.
status-code
<
0 Successful allocation
157 Unable to allocate memory