rpc_sm_set_client_alloc_free-sets the memory allocation and freeing mechanisms used by the client stubs
#include <rpc.h>
void rpc_sm_set_client_alloc_free(
idl_void_p_t (*p_allocate)(
unsigned32 size),
void (*p_free)(
idl_void_p_t ptr),
unsigned32 *status);
Input
- p_allocate
- Specifies a memory allocator routine.
- p_free
- Specifies a memory free routine. This routine is used to free memory allocated with the routine specified by p_allocate.
Output
- status
- Returns the status code from this routine. The status code indicates whether the routine completed successfully, or if not, why not.
Possible status codes and their meanings include:
- rpc_s_ok
- Success.
The rpc_sm_set_client_alloc_free() routine overrides the default routines that the client stub uses to manage memory.
- Note:
- The default memory management routines are ISO free() and ISO malloc(), except when the remote call occurs within manager code in which case the default memory management routines are rpc_sm_free() and rpc_sm_allocate().
None.
rpc_sm_allocate()
rpc_sm_free().
Please note that the html version of this specification may contain formatting aberrations. The definitive version is available as an electronic publication on CD-ROM from The Open Group.
Contents | Next section | Index |