BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   Tuxedo Doc Home   |   Reference   |   Topic List   |   Previous   |   Next   |   Contents

   BEA Tuxedo C Function Reference

rpc_sm_set_client_alloc_free, rpc_ss_set_client_alloc_free(3c)

Name

rpc_sm_set_client_alloc_free(), rpc_ss_set_client_alloc_free() - sets the memory allocation and freeing mechanisms used by the client stubs

Synopsis

#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))

Description

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() and rpc_ss_free().

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

Success.

rpc_s_no_memory

Insufficient memory available to set up necessary data structures.

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

Insufficient memory available to set up necessary data structures.

A thread in a multithreaded application may issue a call to rpc_sm_set_client_alloc_free() or rpc_ss_set_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)

Programming a BEA Tuxedo Application Using TxRPC