diff options
author | Rich Salz <rsalz@akamai.com> | 2015-12-16 23:02:47 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-12-22 09:11:07 -0500 |
commit | 4fae386cb0563a0c05c2817a5ccb3c18e6d62d8d (patch) | |
tree | be4d48641c4e87ab56a24df3e4c4f937c9bb2c34 /crypto/mem_dbg.c | |
parent | c99de0533debc8a6ed08b47b414bdea19457eafd (diff) |
Cleanup CRYPTO_{push,pop}_info
Rename to OPENSSL_mem_debug_{push,pop}.
Remove simple calls; keep only calls used in recursive functions.
Ensure we always push, to simplify so that we can always pop
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/mem_dbg.c')
-rw-r--r-- | crypto/mem_dbg.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/crypto/mem_dbg.c b/crypto/mem_dbg.c index 06d3f6734d..924652a6cb 100644 --- a/crypto/mem_dbg.c +++ b/crypto/mem_dbg.c @@ -145,9 +145,8 @@ typedef struct app_mem_info_st * For application-defined information (static C-string `info') * to be displayed in memory leak list. * Each thread has its own stack. For applications, there is - * CRYPTO_push_info("...") to push an entry, - * CRYPTO_pop_info() to pop an entry, - * CRYPTO_remove_all_info() to pop all entries. + * OPENSSL_mem_debug_push("...") to push an entry, + * OPENSSL_mem_debug_pop() to pop an entry, */ { CRYPTO_THREADID threadid; @@ -384,7 +383,7 @@ static APP_INFO *pop_info(void) return (ret); } -int CRYPTO_push_info_(const char *info, const char *file, int line) +int CRYPTO_mem_debug_push(const char *info, const char *file, int line) { APP_INFO *ami, *amim; int ret = 0; @@ -420,7 +419,7 @@ int CRYPTO_push_info_(const char *info, const char *file, int line) return (ret); } -int CRYPTO_pop_info(void) +int CRYPTO_mem_debug_pop(void) { int ret = 0; @@ -435,21 +434,6 @@ int CRYPTO_pop_info(void) return (ret); } -int CRYPTO_remove_all_info(void) -{ - int ret = 0; - - if (is_MemCheck_on()) { /* _must_ be true */ - MemCheck_off(); /* obtain MALLOC2 lock */ - - while (pop_info() != NULL) - ret++; - - MemCheck_on(); /* release MALLOC2 lock */ - } - return (ret); -} - static unsigned long break_order_num = 0; void CRYPTO_dbg_malloc(void *addr, size_t num, const char *file, int line, int before_p) |