OSF DCE Application Development Guide--Core Components
Chapter 16. Topics in RPC Application
Development
This chapter describes special features of DCE RPC for application development. The
topics include
• Memory management
• Error handling
• Context handles
• Pipes
• Nested calls and callbacks
• Routing RPCs
• Portable data and the IDL encoding services
16.1 Memory Management
When called to handle a remote operation, RPC client stubs allocate and free memory by
using whatever memory management scheme is currently in effect. The client code—the
generic code that can be called from either RPC clients or RPC servers—can use DCE
RPC stub support routines to control which memory management scheme the stubs will
use.
If client code has not explicitly set the memory management routines, the RPC client
stubs use the following defaults:
• When called from manager code, and the operation contains one or more parameters
that are full or unique pointers, or the ACF enable_allocate attribute has been
applied, the client stubs use the rpc_ss_allocate() and rpc_ss_free( ) routines.
• When called from any other context, the RPC client stubs use the operating system
allocation and free routines (for example, malloc( ) and free( )) on POSIX platforms.
Note that the memory management scheme established, whether explicitly or by default,
is on a per-thread basis.
124245 Tandem Computers Incorporated 16−1