Comments (3)
Or the memory management is the responsibility of find_or_create
?
from systemc-components.
Indeed this is a memory leak. The fsm handles are created at https://github.com/Arteris-IP/tlm2-interfaces/blob/48e2de7033275bfc1807925e96154d43325a7325/axi/fsm/base.cpp#L53. Once the bus transaction is finished they are returned into a pool of handles (https://github.com/Arteris-IP/tlm2-interfaces/blob/48e2de7033275bfc1807925e96154d43325a7325/axi/fsm/base.h#L165) and reused from there. But this pool is not free'd upon destruction thus in principle creating a memory leak. Since there is no dynamic instantiation of modules (and hence axi fsms) we did not see this critical yet.
from systemc-components.
One proposal to fix it:
base.h
std::vector<std::unique_ptr<axi::fsm::fsm_handle>> allocated_ptrs;
base.cpp (need slight modification of axi::fsm::fsm_handle
, since there is also potential memory leak)
auto* fsm_hndl = create_fsm_handle();
allocated_ptrs.emplace_back(fsm_hndl);
fsm_hndl->fsm = std::make_shared<AxiProtocolFsm>();
from systemc-components.
Related Issues (20)
- WID is removed in AXI4 HOT 2
- axi::pin::axi4_target B-channel stuck at response HOT 1
- Correct size HOT 1
- warnings
- axi4_lite_cfg with bind_aw
- ar_ready incorrect timing diagram HOT 3
- r_valid and burst request duration issue HOT 7
- w_strb incorrect read HOT 2
- Memory management potential issue HOT 6
- Empty yaml file gives parse error
- Default reset behavior of sc_register should be configurable
- tlm_target should support streaming accesses
- Q: Un-aligned write HOT 5
- tlm_target: Allow assigning custom name to socket HOT 2
- snp
- Q: Build instructions help HOT 1
- ACE target ar_t size HOT 4
- r_last and r_valid for 2 cycles HOT 2
- Configurer does not dump top level params
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from systemc-components.