rpc_sm_set_client_alloc_free
, rpc_ss_set_client_alloc_free
-sets the memory allocation and freeing mechanisms used by the client stubs
#include <rpc/rpc.h>
void rpc_sm_set_client_alloc_free(
idl_void_p_t (*p_allocate)(unsigned long size),
void (*p_free) (idl_void_p_t ptr), unsigned32 *status)
void rpc_ss_set_client_alloc_free(
idl_void_p_t (*p_allocate)(unsigned long size),
void (*p_free) (idl_void_p_t ptr))
The rpc_sm_set_client_alloc_free
routine overrides the default routines that the client stub uses to manage memory. The input parameters, p_allocate
and p_free
specify memory allocator and free routines. The default memory management routines are ISO C malloc
() and free
() except when the remote call occurs within server code in which case the memory management routines must be rpc_ss_allocate
(3) and rpc_ss_free
(3).
The output parameter, status
, returns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not. Possible status codes and their meanings include:
rpc_s_ok
rpc_s_no_memory
rpc_ss_set_client_alloc_free
is the exception-returning version of this function and has no status
output parameter. The following exceptions are raised by this routine.
rpc_x_no_memory
None.
rpc_sm_allocate
(3), rpc_sm_free
(3),
BEA TUXEDO TxRPC Guide