From 00fcb53e0152b08537cddc5266aa0abe50f50175 Mon Sep 17 00:00:00 2001 From: dyzheng Date: Fri, 12 Apr 2024 22:40:33 +0800 Subject: [PATCH] Fix: memory record for wrapper data (#3962) Co-authored-by: dyzheng --- source/module_hamilt_lcao/module_hcontainer/hcontainer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/module_hamilt_lcao/module_hcontainer/hcontainer.cpp b/source/module_hamilt_lcao/module_hcontainer/hcontainer.cpp index 4cde27154d..4d31335585 100644 --- a/source/module_hamilt_lcao/module_hcontainer/hcontainer.cpp +++ b/source/module_hamilt_lcao/module_hcontainer/hcontainer.cpp @@ -598,6 +598,10 @@ size_t HContainer::get_memory_size() const } memory += this->tmp_atom_pairs.capacity() * sizeof(AtomPair*); memory += this->tmp_R_index.capacity() * sizeof(int); + if(this->allocated) + { + memory += this->get_nnr() * sizeof(T); + } return memory; }