Skip to main content

๐Ÿ“ Size of Memory

Returns the memory usage of the array.

๐Ÿ“ Syntaxโ€‹

size_t size_of_memory();

๐Ÿ”ฎ Exampleโ€‹

DataTomeMvAvg<int> intAverage(10);
DataTomeMvAvg<int> anotherAverage(4);

// Will return size of int * 10
intAverage.size_of_memory();

// Will return size of int * 4
anotherAverage.size_of_memory();

โฑ Complexityโ€‹

Constant (O(1)).