Include vector size in mem usage count

This commit is contained in:
King_DuckZ 2021-02-12 14:19:55 +01:00
parent dc10c38a3f
commit 52d9210400

View file

@ -101,7 +101,9 @@ namespace wren {
} }
std::size_t DynafuncMaker::total_memory() const { std::size_t DynafuncMaker::total_memory() const {
return m_pages.size() * m_page_size; return m_pages.size() * m_page_size +
m_pages.capacity() * sizeof(decltype(m_pages)::value_type) +
0;
} }
unsigned char* DynafuncMaker::allocate_chunk() { unsigned char* DynafuncMaker::allocate_chunk() {