CBL_ALLOC_MEM Details (↑ Dynamic Memory Allocation)
◄Key► ◄Summary► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
Description:
Updates to any shared memory allocated to this function are NOT
serialized or protected by the Run-Time System; you should use
semaphores to maintain the integrity of the data.
Non-shared memory is owned by the program that created it, and is
released when the program is canceled. Shared memory is owned by the
coru; it is released when the coru is terminated.
Parameters on Entry:
memsize The number of bytes of memory to allocate.
flags bit 0 (x"01"):
Setting this bit to zero means that memory
is to be non-shared; setting it to one means
that memory is to be shared. The default is
non-shared.
bit 1 (x"02"):
Setting this bit to zero means that the
allocated memory is relocatable under the
DOS run-time system; setting it to one means
that the allocated memory is fixed. This bit
has no effect on UNIX or OS/2. The default is
relocatable.
Parameters on Exit:
mem-pointer A pointer to the memory returned. mem-pointer
must be a 01-level data item.
-♦-