IMethodMalloc::Alloc Method
Attempts to allocate a specified amount of memory for a new common intermediate language (CIL) function body.
Syntax
PVOID Alloc (
[in] ULONG cb
);
Parameters
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 NULL.
The Alloc
method should be used in conjunction with the ICorProfilerInfo::SetILFunctionBody method.
Requirements
Platforms: See System Requirements.
Header: CorProf.idl, CorProf.h
Library: CorGuids.lib
.NET Framework Versions: Available since 2.0