[#absl-CordMemoryAccounting]
= xref:absl.adoc[absl]::CordMemoryAccounting
:relfileprefix: ../
:mrdocs:

Memory accounting modes for `Cord&colon;&colon;EstimatedMemoryUsage()`&period;

== Synopsis

Declared in `&lt;absl&sol;strings&sol;cord&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
enum class CordMemoryAccounting : int;
----

== Members

[cols="1,4"]
|===
| Name| Description
| `kTotal` 
| Counts the _approximate_ number of bytes held in full or in part by this Cord (which may not remain the same between invocations)&period; Cords that share memory could each be &quot;charged&quot; independently for the same shared memory&period; See also comment on `kTotalMorePrecise` on internally shared memory&period;
| `kTotalMorePrecise` 
| Counts the _approximate_ number of bytes held in full or in part by this Cord for the distinct memory held by this cord&period; This option is similar to `kTotal`, except that if the cord has multiple references to the same memory, that memory is only counted once&period;
| `kFairShare` 
| Counts the _approximate_ number of bytes held in full or in part by this Cord weighted by the sharing ratio of that data&period; For example, if some data edge is shared by 4 different Cords, then each cord is attributed 1&sol;4th of the total memory usage as a &apos;fair share&apos; of the total memory usage&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
