summaryrefslogtreecommitdiffstats
path: root/crypto/crypto.h
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>1999-11-12 02:51:24 +0000
committerRichard Levitte <levitte@openssl.org>1999-11-12 02:51:24 +0000
commit1f575f1b1df1d4effa5a97cf97850097d69aee8c (patch)
tree9c58c91aed247f7f8517fe4c67c96ac9c25e5375 /crypto/crypto.h
parentf18a93ab04f248de45a8bcdded9b91880c690dbd (diff)
Two changes have been made:
1. Added code to the memory leak detecting code to give the user the possibility to add information, thereby forming a traceback. 2. Make the memory leak detecting code multithread-safe. The idea is that we're actually dealing with two separate critical sections, one containing the hash tables with the information, the other containing the current memory checking mode. Those should not be handled with the same lock, especially since their handling overlap. Hence, the added second lock.
Diffstat (limited to 'crypto/crypto.h')
-rw-r--r--crypto/crypto.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/crypto.h b/crypto/crypto.h
index f7f52dbdd4..3bc9b1a9af 100644
--- a/crypto/crypto.h
+++ b/crypto/crypto.h
@@ -112,7 +112,8 @@ extern "C" {
#define CRYPTO_LOCK_READDIR 22
#define CRYPTO_LOCK_RSA_BLINDING 23
#define CRYPTO_LOCK_DH 24
-#define CRYPTO_NUM_LOCKS 25
+#define CRYPTO_LOCK_MALLOC2 25
+#define CRYPTO_NUM_LOCKS 26
#define CRYPTO_LOCK 1
#define CRYPTO_UNLOCK 2
@@ -302,6 +303,9 @@ void CRYPTO_free(void *);
void *CRYPTO_realloc(void *addr,int num);
void *CRYPTO_remalloc(void *addr,int num);
+int CRYPTO_add_info(const char *file, int line, const char *info);
+int CRYPTO_remove_info();
+
void *CRYPTO_dbg_malloc(int num,const char *file,int line);
void *CRYPTO_dbg_realloc(void *addr,int num,const char *file,int line);
void CRYPTO_dbg_free(void *);