![]() |
![]() |
|
|
rpc_sm_swap_client_alloc_free, rpc_ss_swap_client_alloc_free(3c)
Name
rpc_sm_swap_client_alloc_free(), rpc_ss_swap_client_alloc_free()—Exchanges current memory allocation and freeing mechanism used by client stubs with one supplied by client.
Synopsis
#include <rpc/rpc.h>
void rpc_sm_swap_client_alloc_free(
idl_void_p_t (*p_allocate)(unsigned long size),
void (*p_free) (idl_void_p_t ptr),
idl_void_p_t (**p_p_old_allocate)(unsigned long size),
void (**p_p_old_free)( idl_void_p_t ptr),
unsigned32 *status)
void rpc_ss_swap_client_alloc_free(
idl_void_p_t (*p_allocate)(unsigned long size),
void (*p_free) (idl_void_p_t ptr),
idl_void_p_t (**p_p_old_allocate)(unsigned long size),
void (**p_p_old_free)( idl_void_p_t ptr))
Description
The rpc_sm_swap_client_alloc_free() routine exchanges the current allocate and free mechanisms used by the client stubs for routines supplied by the caller. The input parameters, p_allocate and p_free, specify new memory allocation and free routines. The output parameters, p_p_old_allocate and p_p_old_free return the memory allocation and free routines in use before the call to this routine.
When a callable routine is an RPC client, it may need to ensure which allocate and free routines are used, despite the mechanism its caller had selected. This routine allows scoped replacement of the allocation/free mechanism to allow this.
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_ss_swap_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:
A thread in a multithreaded application may issue a call to rpc_sm_swap_client_alloc_free() or rpc_ss_swap_client_alloc_free() while running in any context state, including TPINVALIDCONTEXT.
Return Values
None.
See Also
rpc_sm_allocate, rpc_ss_allocate(3c), rpc_sm_free, rpc_ss_free(3c), rpc_sm_set_client_alloc_free, rpc_ss_set_client_alloc_free(3c)
Programming BEA Tuxedo ATMI Applications Using TxRPC
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|