Düzenle

Aracılığıyla paylaş


enable_allocate attribute

The [enable_allocate] ACF attribute specifies that the server stub code should enable the stub memory management environment.

Note

The [enable_allocate] attribute is obsolete and is no longer supported.

 

[
    enable_allocate
  [ , optional-attribute-list]
]
interface interface-name
{
    . . .
};

Parameters

optional-attribute-list

Specifies a list of zero or more additional MIDL attributes.

interface-name

The name of the interface to which the [enable_allcoate] attribute will be applied.

Remarks

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, 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

Application Configuration File (ACF)

midl_user_allocate

midl_user_free

/osf

RpcSmDisableAllocate

RpcSmEnableAllocate

RpcSmFree