summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2017-10-04 21:17:58 -0400
committerRich Salz <rsalz@openssl.org>2017-10-12 22:04:12 -0400
commit0e598a3d185e9bbfe1a513c05063970a1c532e23 (patch)
treeca2dcce92dfeaa5413c6a065e17127b76860b4b8 /include
parent8abeefeccc4cfbfba9b5ebfc7604fe257a97317a (diff)
Add CRYPTO_get_alloc_counts.
Use atomic operations for the counters Rename malloc_lock to memdbg_lock Also fix some style errors in mem_dbg.c Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/4359)
Diffstat (limited to 'include')
-rw-r--r--include/internal/cryptlib.h1
-rw-r--r--include/openssl/crypto.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/internal/cryptlib.h b/include/internal/cryptlib.h
index 5f2cb44dce..4280185ab4 100644
--- a/include/internal/cryptlib.h
+++ b/include/internal/cryptlib.h
@@ -86,6 +86,7 @@ extern int OPENSSL_NONPIC_relocated;
void crypto_cleanup_all_ex_data_int(void);
int openssl_init_fork_handlers(void);
+extern CRYPTO_RWLOCK *memdbg_lock;
int openssl_strerror_r(int errnum, char *buf, size_t buflen);
# if !defined(OPENSSL_NO_STDIO)
FILE *openssl_fopen(const char *filename, const char *mode);
diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h
index 8df7f3c233..5e9517d0fb 100644
--- a/include/openssl/crypto.h
+++ b/include/openssl/crypto.h
@@ -303,6 +303,7 @@ void OPENSSL_cleanse(void *ptr, size_t len);
CRYPTO_mem_debug_pop()
int CRYPTO_mem_debug_push(const char *info, const char *file, int line);
int CRYPTO_mem_debug_pop(void);
+void CRYPTO_get_alloc_counts(int *mcount, int *rcount, int *fcount);
/*-
* Debugging functions (enabled by CRYPTO_set_mem_debug(1))