Qp2malloc()--Allocate IBM PASE for i 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 IBM® i PASE heap by calling the IBM PASE for i 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 IBM PASE for i address of the allocated memory. The return value is always 64-bits, even for a 32-bit IBM PASE for i program. mem_pase can be null if the caller does not need the IBM PASE for i address of the memory allocation.

Authorities

None.


Return Value

The function result is a pointer to the IBM PASE for i 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

[ Back to top | IBM PASE for i APIs | APIs by category ]