# DumpMemDebug

Dumps memory allocation debugging information.

### Synopsis

`Err DumpMemDebug(const TagArg *args);`

### Description

This function outputs a table showing all memory currently allocated through the memory debugging code. This table shows the allocation size, address, as well as the source file and the source line where the allocation took place.

This function also outputs statistics about general memory allocation patterns. This includes the number of memory allocation calls that have been performed, the maximum number of bytes allocated at any one time, current amount of allocated memory, etc. All this information is displayed on a per-thread basis, as well as globally for all threads.

To use this function, the memory debugging code must have been previously initialized using the `CreateMemDebug()` function.

### Arguments

args
  A pointer to an array of tag arguments containing extra data for this function. This must currently always be NULL.

### Return Value

Returns > = 0 if successful, or a negative error code if not. Current Possible error code is:

MEMDEBUG_ERR_BADTAG
  An undefined tag was supplied. Currently the arg's parameter to this function should always be NULL.

### Implementation

Library routine implemented in memdebug.lib V24.

### Associated Files

mem.h, memdebug.lib

### See Also

``CreateMemDebug`(), DeleteMemDebug(), SanityCheckMemDebug()`

#