small_vector】的更多相关文章

folly/small_vector.h folly::small_vector<T,Int=1,...> is a sequence container that implements small buffer optimization. It behaves similarly to std::vector, except until a certain number of elements are reserved it does not use the heap. Like stand…
介绍 使用场景 为什么不是std::array 其他用法 其他类似库 Benchmark 代码关注点 主要类 small_vector small_vector_base 数据结构 InlineStorageType capacity capacity内联在对象中 通过malloc_usable_size获取capacity 将capacity放到堆上 size()相关 capacity()函数 数据内联在对象中 为capacity分配了内存 不为capacity分配空间 扩容 先迁移原有数据还…
folly/PackedSyncPtr.h A highly specialized data structure consisting of a pointer, a 1-bit spin lock, and a 15-bit integral packed into sizeof(void*). Typical application is for microsharding of many elements within containers. Because there is no me…
原文地址:  https://www.cnblogs.com/Leo_wl/archive/2012/06/27/2566346.html   阅读目录 学习代码库的一般步骤 folly库的学习心得 总结 回到目录   学习代码库的一般步骤 1) 编译安装:2) 学习doc/manual文档:3) 学习test用例:4) 测试并使用. 回到目录 folly库的学习心得 独立有用的小技巧 Eventfd.h ---- 针对eventfd系统调用的包装器. Foreach.h ---- 伪语句(作为…
folly/ For a high level overview see the README Components Below is a list of (some) Folly components in alphabetical order, along with a brief description of each. Arena.h, ThreadCachedArena.h Simple arena for memory allocation: multiple allocations…