English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 26 April 2017, 11:29   #1
clebin
Registered User
clebin's Avatar
 
Join Date: Apr 2012
Location: Cardiff
Posts: 256
Tracking a game/program's memory usage

What's the best way to track the memory usage of my game?

I want to know how much spare memory I have to play with and I can't see the Workbench titlebar while it runs.

* Some debug status built into the game? (nb. written in C, not ASM)
* Some utility on Aminet that can log memory over time?
* FS-UAE/WinUAE debug? (FS-UAE preferred)
* HRTMon/Action Replay?

How do others do this?
clebin is offline  
AdSense AdSense  
Old 26 April 2017, 12:35   #2
roondar
Registered User

 
Join Date: Jul 2015
Location: The Netherlands
Posts: 253
I'm not sure whether you just want to know how much memory is free on the machine, or how much memory your program is using.

So, assuming you want to know how much free memory is available:

There are indeed Aminet utilities, some with source, that can tell you how much free memory there is. You could also get the pointer to the Exec memory list and traverse it yourself, though that might involve some pointer arithmetic to work. As a last resort, you could also just execute the avail command and parse it's output.

But these are only really needed if you're using Kickstart 1.3. If your game is running Kickstart 2.0+, the easiest way by far it to just use the Exec AvailMem() function.

See: http://amigadev.elowar.com/read/ADCD.../node01EE.html
roondar is offline  
Old 26 April 2017, 15:55   #3
clebin
Registered User
clebin's Avatar
 
Join Date: Apr 2012
Location: Cardiff
Posts: 256
Quote:
Originally Posted by roondar View Post
I'm not sure whether you just want to know how much memory is free on the machine, or how much memory your program is using.
I want to find out how much memory my program is using, basically.

It currently runs on a stock 512k machine and I want to know how much RAM is left for sound effects, etc. Knowing how much is free before and during is ok as I can do the maths with that.

Quote:
So, assuming you want to know how much free memory is available:

There are indeed Aminet utilities, some with source, that can tell you how much free memory there is. You could also get the pointer to the Exec memory list and traverse it yourself, though that might involve some pointer arithmetic to work. As a last resort, you could also just execute the avail command and parse it's output.

But these are only really needed if you're using Kickstart 1.3. If your game is running Kickstart 2.0+, the easiest way by far it to just use the Exec AvailMem() function.

See: http://amigadev.elowar.com/read/ADCD.../node01EE.html
Thanks! I'll check that out. It's only needed during development, so KS2.0+ is fine.
clebin is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to load program into fixed memory area ShK Coders. System 3 07 July 2016 10:46
Tracking/music production on Amiga jmph New to Emulation or Amiga scene 9 13 August 2015 19:33
Memory usage: Pinball dreams? emuola project.WHDLoad 2 02 November 2014 14:43
Best program to test memory? Mustangjeff support.Hardware 5 05 October 2012 08:43
tracking / MIDI - amiga vs pc cosmiq request.Apps 3 05 April 2002 11:34

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:14.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.17583 seconds with 12 queries