PreviousNext

rpc_sm_swap_client_alloc_free(3rpc)

Exchanges the current memory allocation and freeing mechanism used by the client stubs with one supplied by the client

Synopsis

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

Parameters

Input

p_allocate
Specifies a new memory allocation routine.

p_free
Specifies a new memory free routine.

Output

p_p_old_allocate
Returns the memory allocation routine in use before the call to this routine.

p_p_old_free
Returns the memory free routine in use before the call to this routine.

status
Returns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not.

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.

Return Values
None.

Errors

The following describes a partial list of errors that might be returned. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.

rpc_s_ok
Success.

Related Information
Functions: rpc_sm_allocate(3rpc)

rpc_sm_free(3rpc)

rpc_sm_set_client_alloc_free(3rpc)