[#CuckooCache-cache-setup_bytes]
= xref:CuckooCache.adoc[CuckooCache]::xref:CuckooCache/cache.adoc[cache]::setup&lowbar;bytes
:relfileprefix: ../../
:mrdocs:

setup&lowbar;bytes is a convenience function which accounts for internal memory usage when deciding how many elements to store&period; It isn&apos;t perfect because it doesn&apos;t account for any overhead (struct size, MallocUsage, collection and epoch flags)&period; This was done to simplify selecting a power of two size&period; In the expected use case, an extra two bits per entry should be negligible compared to the size of the elements&period;

== Synopsis

Declared in `&lt;cuckoocache&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::pair&lt;uint32&lowbar;t, size&lowbar;t&gt;
setup&lowbar;bytes(size&lowbar;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&period;

== 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]#
