aboutsummaryrefslogtreecommitdiff
path: root/src/ckh.c
diff options
context:
space:
mode:
authorJason Evans <je@fb.com>2012-02-13 10:24:43 -0800
committerJason Evans <je@fb.com>2012-02-13 10:24:43 -0800
commitfd56043c53f1cd1335ae6d1c0ee86cc0fbb9f12e (patch)
tree384192cb6b0415aafbfc43497a58d2b020c9191a /src/ckh.c
parent7372b15a31c63ac5cb9ed8aeabc2a0a3c005e8bf (diff)
downloadjemalloc-fd56043c53f1cd1335ae6d1c0ee86cc0fbb9f12e.tar.gz
Remove magic.
Remove structure magic, because 1) it is no longer conditional, and 2) it stopped being very effective at detecting memory corruption several years ago.
Diffstat (limited to 'src/ckh.c')
-rw-r--r--src/ckh.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/ckh.c b/src/ckh.c
index f7eaa78..4a6d1e3 100644
--- a/src/ckh.c
+++ b/src/ckh.c
@@ -73,7 +73,6 @@ ckh_isearch(ckh_t *ckh, const void *key)
size_t hash1, hash2, bucket, cell;
assert(ckh != NULL);
- assert(ckh->magic == CKH_MAGIC);
ckh->hash(key, ckh->lg_curbuckets, &hash1, &hash2);
@@ -394,9 +393,6 @@ ckh_new(ckh_t *ckh, size_t minitems, ckh_hash_t *hash, ckh_keycomp_t *keycomp)
goto RETURN;
}
- if (config_debug)
- ckh->magic = CKH_MAGIC;
-
ret = false;
RETURN:
return (ret);
@@ -407,7 +403,6 @@ ckh_delete(ckh_t *ckh)
{
assert(ckh != NULL);
- assert(ckh->magic == CKH_MAGIC);
#ifdef CKH_VERBOSE
malloc_printf(
@@ -432,7 +427,6 @@ ckh_count(ckh_t *ckh)
{
assert(ckh != NULL);
- assert(ckh->magic == CKH_MAGIC);
return (ckh->count);
}
@@ -463,7 +457,6 @@ ckh_insert(ckh_t *ckh, const void *key, const void *data)
bool ret;
assert(ckh != NULL);
- assert(ckh->magic == CKH_MAGIC);
assert(ckh_search(ckh, key, NULL, NULL));
#ifdef CKH_COUNT
@@ -488,7 +481,6 @@ ckh_remove(ckh_t *ckh, const void *searchkey, void **key, void **data)
size_t cell;
assert(ckh != NULL);
- assert(ckh->magic == CKH_MAGIC);
cell = ckh_isearch(ckh, searchkey);
if (cell != SIZE_T_MAX) {
@@ -520,7 +512,6 @@ ckh_search(ckh_t *ckh, const void *searchkey, void **key, void **data)
size_t cell;
assert(ckh != NULL);
- assert(ckh->magic == CKH_MAGIC);
cell = ckh_isearch(ckh, searchkey);
if (cell != SIZE_T_MAX) {