Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/dict.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ dictEntry *dictAddRaw(dict *d, void *key, dictEntry **existing)
* system it is more likely that recently added entries are accessed
* more frequently. */
ht = dictIsRehashing(d) ? &d->ht[1] : &d->ht[0];
entry = zmalloc(sizeof(*entry));
entry = zmalloc_dram(sizeof(*entry));
entry->next = ht->table[index];
ht->table[index] = entry;
ht->used++;
Expand Down Expand Up @@ -390,7 +390,7 @@ static dictEntry *dictGenericDelete(dict *d, const void *key, int nofree) {
if (!nofree) {
dictFreeKey(d, he);
dictFreeVal(d, he);
zfree(he);
zfree_dram(he);
}
d->ht[table].used--;
return he;
Expand Down Expand Up @@ -440,7 +440,7 @@ void dictFreeUnlinkedEntry(dict *d, dictEntry *he) {
if (he == NULL) return;
dictFreeKey(d, he);
dictFreeVal(d, he);
zfree(he);
zfree_dram(he);
}

/* Destroy an entire dictionary */
Expand All @@ -458,7 +458,7 @@ int _dictClear(dict *d, dictht *ht, void(callback)(void *)) {
nextHe = he->next;
dictFreeKey(d, he);
dictFreeVal(d, he);
zfree(he);
zfree_dram(he);
ht->used--;
he = nextHe;
}
Expand Down