]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Fixed memory leak in ShardedLRUCache
authorKosie van der Merwe <kosie.vandermerwe@gmail.com>
Tue, 8 Jan 2013 19:24:15 +0000 (11:24 -0800)
committerKosie van der Merwe <kosie.vandermerwe@gmail.com>
Tue, 8 Jan 2013 19:24:15 +0000 (11:24 -0800)
commit4d339d7462d40c3e01b947445289c3ce2a132046
tree05379e82e636f5d49ba4d5198674704ad50f640e
parent628dc2aad909c86dbec7b96e8334eeac78a92e8f
Fixed memory leak in ShardedLRUCache

Summary: `~ShardedLRUCache()` was empty despite `init()` allocating memory on the heap. Fixed the leak by freeing memory allocated by `init()`.

Test Plan:
make check

Ran valgrind on db_test before and after patch and saw leaked memory went down

Reviewers: vamsi, dhruba, emayanke, sheki

Reviewed By: dhruba

CC: leveldb
Differential Revision: https://reviews.facebook.net/D7791
util/cache.cc