We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2624914 commit f2cee19Copy full SHA for f2cee19
src/common/heap_array.h
@@ -40,6 +40,7 @@ class FixedHeapArray
40
~FixedHeapArray() { deallocate(); }
41
42
size_type size() const { return SIZE; }
43
+ size_type size_bytes() const { return SIZE * sizeof(T); }
44
size_type capacity() const { return SIZE; }
45
bool empty() const { return false; }
46
@@ -234,6 +235,7 @@ class DynamicHeapArray
234
235
~DynamicHeapArray() { internal_deallocate(); }
236
237
size_type size() const { return m_size; }
238
+ size_type size_bytes() const { return m_size * sizeof(T); }
239
size_type capacity() const { return m_size; }
240
bool empty() const { return (m_size == 0); }
241
0 commit comments