OS/2, eCS & ArcaOS - Technical > Programming

Memory 'footprint' API?

(1/2) > >>

Dariusz Piatkowski:
In short, how do I take a snapshot of what's currently loaded?

I'd like to cover both the low and high areas.

What I am not looking for is a summary level stuff. Instead I want to see DLL/object level stuff, where it is sitting and so forth.

I suppose the closest I can describe it to is what the Theseus => Linear Memory Map => Show Process Contexts provides, except that I want to struture a memory map which shows each process currently running and which DLLs it links to and where these DLLs reside in memory.

Is there a starting point in terms of OS/2 APIs I should look at?

ivan:
Hi Dariusz,

I don't know if the attached will give what you want but they might give you ideas.

Dariusz Piatkowski:
Hi Ivan,

Actually, I got that little util, pretty handy, although at some point in time it started crashing on several of the tabs, so things like : Modules, Mod Tree, Sharedmem cause a SYS3175 now.

More importantly, I would like to develop the code needed to provide the memory snapshot. Part of this is driven by my desire to better understand the Shared Memory situation. I see the darn thing dropping slowly, at times I see applications which will consume large chunks that never appear to be given back. This is a known issue, which I wish to understand better.

ivan:

--- Quote ---Actually, I got that little util, pretty handy, although at some point in time it started crashing on several of the tabs, so things like : Modules, Mod Tree, Sharedmem cause a SYS3175 now.
--- End quote ---

Very strange, it works well on my Ryzen boxes.  It sounds as if you have something strange going on with your computer - it is almost as if you have a suspect memory stick, either speed or a chip going bad (I have seen memory problems when the memory speed isn't optimum for the processor and chipset).

Dave Yeo:

--- Quote from: Dariusz Piatkowski on April 29, 2020, 07:12:26 pm ---In short, how do I take a snapshot of what's currently loaded?

I'd like to cover both the low and high areas.

What I am not looking for is a summary level stuff. Instead I want to see DLL/object level stuff, where it is sitting and so forth.

I suppose the closest I can describe it to is what the Theseus => Linear Memory Map => Show Process Contexts provides, except that I want to struture a memory map which shows each process currently running and which DLLs it links to and where these DLLs reside in memory.

Is there a starting point in terms of OS/2 APIs I should look at?

--- End quote ---

Theseus is the best we have. For shared DLLs, high light a process, doesn't matter much which, and under process, click on Shared Object Summary, which will tell you which and where DLLs are loaded. Bottom of the list above address 1FFF0000 is the high memory arena. There's also the private memory summary and various other stuff under process such as General Process Information which will tell you what files a program has opened, where the DLLs a process is using is listed.
If you look under help, there's the various programming interfaces, C and Rexx if you want to write a better program using the Theseus Data.

Navigation

[0] Message Index

[#] Next page

Go to full version