Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about the misc/lru.h Key pointer problem #3

Open
taozhijiang opened this issue Apr 25, 2019 · 0 comments
Open

about the misc/lru.h Key pointer problem #3

taozhijiang opened this issue Apr 25, 2019 · 0 comments

Comments

@taozhijiang
Copy link

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 ??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant