Returns the size of a memory block allocated in the heap (debug version only).
The alignment and offset values must be the same as the values passed to the function that allocated the block.
_aligned_msize_dbg is a debug version of the _aligned_msize function. When _DEBUG is not defined, each call to _aligned_msize_dbg is reduced to a call to _aligned_msize. Both _aligned_msize and _aligned_msize_dbg calculate the size of a memory block in the base heap, but _aligned_msize_dbg adds a debugging feature: It includes the buffers on either side of the user portion of the memory block in the returned size.
This function validates its parameter. If memblock is a null pointer or alignment is not a power of 2, _msize invokes an invalid parameter handler, as described in Parameter Validation. If the error is handled, the function sets errno to EINVAL and returns -1.
For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see Memory Management and the Debug Heap. For information about the allocation block types and how they are used, see Types of Blocks on the Debug Heap. For information about the differences between calling a standard heap function and its debug version in a debug build of an application, see Using the Debug Version Versus the Base Version.
Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.