Skip to content

Latest commit

 

History

History
88 lines (61 loc) · 2.91 KB

enable-allocate.md

File metadata and controls

88 lines (61 loc) · 2.91 KB
title description ms.assetid keywords topic_type api_name api_type ms.topic ms.date
enable_allocate attribute
The \ enable\_allocate\ ACF attribute specifies that the server stub code should enable the stub memory management environment.
3a232a82-f114-4d8c-8b71-cf8860c77db3
enable_allocate attribute MIDL
apiref
enable_allocate
NA
reference
05/31/2018

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