diff options
author | Jeff Hostetler <jeffhost@microsoft.com> | 2019-06-25 07:49:40 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-06-25 10:46:57 -0700 |
commit | 556702f86cb043f18bf46dceec25fe1e783c4590 (patch) | |
tree | 79bfbdf11c7c3b20f31113abf4e6f4704b4865ea /git-compat-util.h | |
parent | dce7d295514f0acebb897cc37a451963d60588f5 (diff) | |
download | git-556702f86cb043f18bf46dceec25fe1e783c4590.tar.gz |
msvc: add a compile-time flag to allow detailed heap debugging
MS Visual C comes with a few neat features we can use to analyze the
heap consumption (i.e. leaks, max memory, etc).
With this patch, we introduce support via the build-time flag
`USE_MSVC_CRTDBG`.
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index cc0e7e9733..83be89de0a 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -1,6 +1,15 @@ #ifndef GIT_COMPAT_UTIL_H #define GIT_COMPAT_UTIL_H +#ifdef USE_MSVC_CRTDBG +/* + * For these to work they must appear very early in each + * file -- before most of the standard header files. + */ +#include <stdlib.h> +#include <crtdbg.h> +#endif + #define _FILE_OFFSET_BITS 64 |