Amiga.org

Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: tkgshow on March 29, 2009, 09:50:24 AM

Title: Free Memory
Post by: tkgshow on March 29, 2009, 09:50:24 AM
Hey

If I repeatedly ctrl-A-A to restart Workbench
Check the Free Memory gadget at the top of the main screen
I'm given the following readings

887,144
887,176
896,080
887,200
887,144 (thought this was predictable now)
887,176
887,120 (sadly not)
887,120
887,120

after 9 restarts

I didn't take any more readings

Does anyone know whats going on here in RAM?

kgs
Title: Re: Free Memory
Post by: Astral on March 29, 2009, 10:53:26 AM
Quote

tkgshow wrote:

Does anyone know whats going on here in RAM?


I do. You've got nothing better to do.

Whack Lemmings in the disk drive instead!  :lol:
Title: Re: Free Memory
Post by: Piru on March 29, 2009, 11:28:04 AM
Quote
Does anyone know whats going on here in RAM?

What makes you think that the free memory should always be the same after each reboot?
Title: Re: Free Memory
Post by: tkgshow on March 29, 2009, 12:05:18 PM
i guess i'm assuming
1 a reboot starts with empty RAM
2 booting should be the same each time
3 that the mem taken by workbench should be unchanging
i can't see what here should have a diff of 1k
i'd like to find out though  :-)
Title: Re: Free Memory
Post by: tkgshow on March 29, 2009, 12:06:50 PM
oops
>>> i can't see what here should have a diff of 1k
actually 10k
Title: Re: Free Memory
Post by: Zac67 on March 29, 2009, 12:14:24 PM
Quote
What makes you think that the free memory should always be the same after each reboot?

I'd have thought so - why should one system boot differ from the other?
Title: Re: Free Memory
Post by: tkgshow on March 29, 2009, 12:21:09 PM
unless free mem is different before the boot process
i dont know how to check that...
Title: Re: Free Memory
Post by: Piru on March 29, 2009, 12:43:23 PM
This is no C64 or MSDOS.

AmigaOS is a multitasking system, the amount of memory taken by the system/apps varies greatly over time. There is no way to predict the amount of free memory at any given time.
Title: Re: Free Memory
Post by: Ilwrath on March 29, 2009, 01:01:36 PM
Quote
AmigaOS is a multitasking system, the amount of memory taken by the system/apps varies greatly over time. There is no way to predict the amount of free memory at any given time.


Yep...  And to continue on what Piru is saying, the Amiga doesn't use a fixed memory map like the C64, either.  From bootup to bootup, programs (even ones called from s:startup-sequence) can end up located in different base addresses of RAM, and cause different memory fragmentation to occur.  All based on the lucky spin of the program counter that boot.

So, even though you may boot the machine the exact same way 10 times in a row, you won't obtain 10 cycle-identical bootups.  Hence, you'll have variations in free RAM.  (And, also, keep in mind that the screen itself is buffered in RAM, so when you click to check the memory available you may also be unwittingly introducing a variable to the memory available reading.   :lol: )
Title: Re: Free Memory
Post by: tkgshow on March 29, 2009, 01:14:32 PM
thanks for the replies
where can i discover more?
is there a way for me to mess with the boot?
i want to see this stuff in action
how can i dump mem during boot?
can i bypass the amiga rom boot?
where can i read about AmigaOS?
:-?  :-?
Title: Re: Free Memory
Post by: Ilwrath on March 29, 2009, 01:37:30 PM
Quote
where can i discover more?

I think you've found the right place.  :-)

Quote
is there a way for me to mess with the boot?


s:startup-sequence is a text batch file that the AmigaDOS ROM hands off to after it completes.  You get an idea what the Amiga is doing on start after looking this over.  (Make a backup disk before editing this, of course.  ;-)  )

In AmigaDOS 1.3 and lower, l:system-configuration stores the screenmode that the Amiga comes up in.  For 2.0 and higher, it controls screenmode only if s:startup-sequence is missing or if the Amiga was booted with a "No Startup Sequence" option.  This file is binary though, and is created by the "Prefs" tool in 1.3.

Quote
i want to see this stuff in action

There's some tools like Sysinfo (which also benchmarks, but gives lots of great version and memory details) and SnoopDOS (lets you know what programs are trying to do while loading) that can give a little more clue what's going on under-the-hood, without being too prohibitively difficult...  I forget what program I used to use that would show the base address of literally every task running, and allow you to kill things and mess around, but that was cool, too...  Easy way to guru the system, but hey, that's half the fun, too, right?   :lol: