enable_allocate

Remarks

The keyword enable_allocate specifies that the server stub code should enable the stub memory management environment. In default mode, the server stub enables the memory environment only when the enable_allocate attribute is used. The memory management environment must be enabled before memory can be allocated using RpcSmAllocate. In osf mode (when you compile using the /osf switch), the stub enables this environment automatically when the remote operation includes full pointers or pointers that provide for the stub or the user to allocate memory, or on request when the enable_allocate attribute is used.

The client side stub may be sensitive to the Rpcss memory management environment. If a sensitive client stub is executed when the Rpcss package is disabled, the default user allocator/deallocators are called (for example, midl_user_allocate/midl_user_free). When enabled, the Rpcss package uses the allocator/deallocator pair from the package. In the default mode, the client is sensitive only when the enable_allocate attribute is used. Typically, the client side stub operates in the disabled environment. In osf mode (when you compile using the /osf switch), the client is always sensitive to the Rpcss memory management environment and, therefore, the enable_allocate attribute will not affect the client stubs.

See Also

ACF, RpcSmDisableAllocate, RpcSmEnableAllocate, RpcSmFree