simcc icon indicating copy to clipboard operation
simcc copied to clipboard

about the misc/lru.h Key pointer problem

Open taozhijiang opened this issue 5 years ago • 0 comments

I read the lru.h code, I have an question want to ask:

lru-cache-cpp assumes the whole hash was allocated when finished construction, so will not cause rehash problem, and pointer to key and value will not invalid later. But you implementation replaced with std::unordered_map, and not acquired whole memory before, then your const K* key may invalid if rehash occurs.

And another question, what's the meaning of your ValueSize? the difference of sizeof_ and sizeof ??

taozhijiang avatar Apr 25 '19 02:04 taozhijiang