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_free, rpc_ss_free(3c)

Name

rpc_sm_free, rpc_ss_free() - frees memory allocated by the rpc_sm_allocate() routine

Synopsis

#include <rpc/rpc.h>
void rpc_sm_free(idl_void_p_t node_to_free, unsigned32 *status)
void rpc_ss_free(idl_void_p_t node_to_free)

Description

Applications call rpc_sm_free() to release memory allocated by rpc_sm_allocate(). The input parameter, node_to_free, specifies a pointer to memory allocated by rpc_sm_allocate(). Note that in ISO standard C environments, idl_void_p_t is defined as void * and in other environments is defined as char *.

When the stub allocates memory within the stub memory management environment, service code called from the stub can also use rpc_sm_free() to release memory allocated by the stub.

Unpredictable behavior results if rpc_ss_free() is called with a pointer to memory not allocated by rpc_sm_allocate() or memory allocated by rpc_sm_allocate(), but not the first address of such an allocation.

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_ss_free is the exception-returning version of this function and has no status output parameter. No exceptions are raised.

A thread in a multithreaded application may issue a call to rpc_sm_free() or rpc_ss_free() while running in any context state, including TPINVALIDCONTEXT.

Return Values

None.

See Also

rpc_sm_allocate, rpc_ss_allocate(3c)

Programming a BEA Tuxedo Application Using TxRPC