Qp2malloc()--Allocate i5/OS PASE Heap Memory


  Syntax
 #include <qp2user.h>

 void* Qp2malloc(QP2_dword_t size,
                 QP2_ptr64_t *mem_pase);  

  Service Program Name: QP2USER

  Default Public Authority: *USE

  Threadsafe: Yes

Qp2malloc() allocates memory from the i5/OS PASE heap by calling the i5/OS PASE malloc() function.


Parameters

size
(Input) The size, in bytes, of the desired memory allocation.

mem_pase
(Input) A pointer to a buffer, used to return the i5/OS PASE address of the allocated memory. The return value is always 64-bits, even for a 32-bit i5/OS PASE program. mem_pase can be null if the caller does not need the i5/OS PASE address of the memory allocation.

Authorities

None.


Return Value

The function result is a pointer to the i5/OS PASE heap memory allocation, or a null pointer if no memory was allocated. A buffer addressed by the mem_pase argument is unchanged if no memory was allocated.


Related Information



API introduced: V5R2
Top | i5/OS PASE APIs | APIs by category