[hatari-devel] Re: BM407 + symbols

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]

If you need some kind of system side memory allocation statistics,
I could look into adding something for that.  With profiler caller
tracking it might even be possible to get JSR/BSR call backtraces
for those (or more generally, to specified GEMDOS functions).

That might be quite useful, although the best way to do this is normally through some sort of API (so you can associate allocations with contexts). 

I considered adding this to the code itself but some mix of both sides would probably be ideal.

e.g. for metrics I have a small which counts events for specific contexts, but collapses away in a final build. Something similar to indicate ownership of allocs might be useful.

Most of the memory allocation stuff happens at C-library level though
because TOS memory management is so limited, so system level tracking
might not be that useful...

Both Doom and BM have their own memory allocator layers above the system one (Doom has ZoneAlloc, BM has a special allocator for handling separate STRam and TTRam arenas, for speed, alignment and defragging the blocks on free). So all allocs should be visible I think providing they are signalled from the code, or their symbols are used to identify calls to them.

Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/