admin管理员组文章数量:1126103
While running my program in Visual Studio, I observed that memory usage was excessively high (over 40GB). I then used Visual Studio's memory profiler to investigate the issue.
After capturing memory snapshots at two intervals, I observed that two entries std::list<SSD_Components::NVM_Transaction*,std::allocator<SSD_Components::NVM_Transaction*>>
and void
continue to grow. The differences in both their memory size and count between snapshots are the largest, and they keep increasing, which is unusual since these entries should not be growing indefinitely.
Here’s the relevant code for the User_Request
class, which contains the Transaction_list
member holding pointers to NVM_Transaction
objects. This list is related to the growing entries in the memory profiler for std::list<SSD_Components::NVM_Transaction*,std::allocator<SSD_Components::NVM_Transaction*>>
.
class User_Request
{
public:
User_Request();
~User_Request();
IO_Flow_Priority_Class::Priority Priority_class;
io_request_id_type ID;
uint64_t ID_num;
LHA_type Start_LBA;
sim_time_type STAT_InitiationTime;
sim_time_type STAT_ResponseTime;
std::list<NVM_Transaction*> Transaction_list;
unsigned int Sectors_serviced_from_cache;
unsigned int Size_in_byte;
unsigned int SizeInSectors;
UserRequestType Type;
stream_id_type Stream_id;
bool ToBeIgnored;
void* IO_command_info;
void* Data;
private:
static unsigned int lastId;
};
I’ve checked for potential memory leaks, but I didn’t find any issues. What could be the other possible reasons for the continuous growth in memory usage?
Any insights or suggestions would be greatly appreciated!
本文标签:
版权声明:本文标题:c++ - Possible Causes of Continuous Growth in std::list<SSD_Components::NVM_Transaction*> and void Entries in VS M 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736641346a1945999.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论