add `getAllocatedMemorySize` for F14 sets, fix corner cases
Summary: This diff adds a method to calculate the amount of memory allocated by F14 sets. It mimics the node structure in `std::unordered_map` to calculate the results. For certain keys and hashers, the libstdc++ implementation of `std::unordered_map` caches a hash code in the node. libcpp seems to do this for everything. https://github.com/gcc-mirror/gcc/blob/9ce5a00d2d3b8b107cb1ca0e23bf1e31a095f9b6/libstdc%2B%2B-v3/include/bits/hashtable.h#L45-L49 https://github.com/llvm-mirror/libcxx/blob/58bcf28c63e0cf2ee5828e7811829c98bd244dda/include/__hash_table#L117 Depends on D7715573. Reviewed By: nbronson Differential Revision: D7728281 fbshipit-source-id: 0aa3ab60c746d3ab6bdb7c879f2f987110e0329d
Showing
Please register or sign in to comment