Summary:
- Non-GNU standard C++ libraries may have a different layout; only
report memory usage when we know we're using GNU's.
Test Plan:
- fbconfig -r folly && fbmake runtests
- ./configure && make check on Ubuntu/FC/Mac
Reviewed By: andrei.alexandrescu@fb.com
FB internal diff:
D998584
if (i > 0) sets_[i] = sets_[0];
}
+// This requires knowledge of the C++ library internals. Only use it if we're
+// using the GNU C++ library.
+#ifdef _GLIBCXX_SYMVER
// memory usage
int64_t setMemorySize = sets_[0].size() * sizeof(*sets_[0].begin()._M_node);
int64_t cslMemorySize = 0;
LOG(INFO) << "size=" << sets_[0].size()
<< "; std::set memory size=" << setMemorySize
<< "; csl memory size=" << cslMemorySize;
+#endif
readValues_.reserve(size);
deleteValues_.reserve(size);