IMethodMalloc::Alloc Method

Attempts to allocate a specified amount of memory for a new Microsoft intermediate language (MSIL) function body.

PVOID Alloc (
    [in] ULONG   cb
);

Parameters

Parameter Description

cb

[in] The number of bytes to allocate for the method body.

Remarks

The allocated memory will begin at an address greater than the base address of the module that is associated with this allocator. In other words, each allocator is created for a particular module, and will attempt to allocate memory at a positive offset from its base address. If Alloc fails to allocate the requested number of bytes at an address greater than the base address of the module, it returns E_OUTOFMEMORY, regardless of the actual amount of memory space available.

The Alloc method should be used in conjunction with the ICorProfilerInfo::SetILFunctionBody Method method.

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: CorProf.idl

Library: CorGuids.lib

.NET Framework Version: 2.0

See Also

Reference

IMethodMalloc Interface