NAME rpc_sm_allocate - Allocates memory within the RPC stub memory management scheme SYNOPSIS #include <rpc.h> idl_void_p_t rpc_sm_allocate ( unsigned long size, unsigned32 *status ); PARAMETERS Input size Specifies, in bytes, the size of memory to be allocated. Output 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. DESCRIPTION Applications call rpc_sm_allocate to allocate memory within the RPC stub memory management scheme. Before a call to this routine, the stub memory management environment must have been established. For manager code that is called from the stub, the stub itself normally establishes the necessary environment. When rpc_sm_allocate is used by code that is not called from the stub, the application must establish the required memory management environment by calling rpc_sm_enable_allocate. When the stub establishes the memory management environment, the stub itself frees any memory allocated by rpc_sm_allocate. The application can free such memory before returning to the calling stub by calling rpc_sm_free. When the application establishes the memory management environment, it must free any memory allocated, either by calling rpc_sm_free or by calling rpc_sm_disable_allocate. Multiple threads may call rpc_sm_allocate and rpc_sm_free to manage the same memory within the stub memory management environment. To do so, the threads must share the same stub memory management thread handle. Applications pass thread handles from thread to thread by calling rpc_sm_get_thread_handle and rpc_sm_set_thread_handle. RETURN VALUES A pointer to the allocated memory. RELATED INFORMATION Functions: rpc_sm_free rpc_sm_enable_allocate rpc_sm_disable_allocate rpc_sm_get_thread_handle rpc_sm_set_thread_handle