msize
Returns the size of a memory block allocated in the heap.
Routine Required Header
_msize <malloc.h>
size_t _msize( void *memblock );
Parameters
memblock
Pointer to memory block
Libraries
All versions of the C run-time libraries.
Return Values
_msize returns the size (in bytes) as an unsigned integer.
Remarks
The _msize function returns the size, in bytes, of the memory block allocated by a call to malloc, or realloc.
When the application is linked with a debug version of the C run-time libraries, _msize resolves to _msize_dbg. For more information about how the heap is managed during the debugging process, see Using C Run-Time Library Debugging Support.
Example
/* REALLOC.C: This program allocates a block of memory for
* buffer and then uses _msize to display the size of that
* block. Next, it uses realloc to expand the amount of
* memory used by buffer and then calls _msize again to
* display the new amount of memory allocated to buffer.
*/