[#CuckooCache-cache-setup_bytes] = xref:CuckooCache.adoc[CuckooCache]::xref:CuckooCache/cache.adoc[cache]::setup_bytes :relfileprefix: ../../ :mrdocs: setup_bytes is a convenience function which accounts for internal memory usage when deciding how many elements to store. It isn't perfect because it doesn't account for any overhead (struct size, MallocUsage, collection and epoch flags). This was done to simplify selecting a power of two size. In the expected use case, an extra two bits per entry should be negligible compared to the size of the elements. == Synopsis Declared in `<cuckoocache.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::pair<uint32_t, size_t> setup_bytes(size_t bytes); ---- == Return Value A pair of the maximum number of elements storable (see setup() documentation for more detail) and the approximate total size of these elements in bytes. == Parameters [cols="1,4"] |=== | Name| Description | *bytes* | the approximate number of bytes to use for this data structure |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#