English Amiga Board


Go Back   English Amiga Board > Main > Amiga scene

 
 
Thread Tools
Old 21 February 2014, 14:24   #1
Amicol
Registered User

 
Join Date: Dec 2013
Location: Hartlepool / England
Posts: 338
A1200 Loses Fast Memory

I've always wondered why my A1200 steadily loses fastmemory during use.
Starting up Igame, various WHDLoad games, the memory doesn't seem to get reclaimed when they are exited.
I have to reboot the system to get my free RAM back.

Is this normal? And if so, why?
Amicol is offline  
AdSense AdSense  
Old 21 February 2014, 14:31   #2
fitzsteve
Professional slacker!
fitzsteve's Avatar
 
Join Date: Jul 2009
Location: Kent, UK
Age: 38
Posts: 6,342
Send a message via MSN to fitzsteve
I often wondered that myself, I guess some processes used to execute these programs stay in Memory, for example after you run IGame once it will load faster consecutive times.

All my Amiga have 128mb+ Ram so it's not bothering me but in lower memory setups it's surely a pain. I know Classic Workbench has a 'Clear Ram' tool, maybe you could use something like this to reclaim some of the Free Ram?
fitzsteve is offline  
Old 21 February 2014, 14:39   #3
Amicol
Registered User

 
Join Date: Dec 2013
Location: Hartlepool / England
Posts: 338
Hi mate, I tried the ClearRAM function on Classic Workbench, but it doesn't clear it.
I have to re-boot.
As you say, it only really bothers me on my lower memory A1200.
Strange....
Amicol is offline  
Old 21 February 2014, 15:05   #4
jimbob
Registered User

 
Join Date: May 2006
Location: Kilmacolm
Age: 39
Posts: 616
How much RAM do you have? My A600 has 32mb so I'm not sure I would have encountered this trouble anyway but I don't use igame, it's nice but takes forever to start. Super slow on ECS if you want the nice screenshots too. Better on A1200 but maybe it has other resource problems too. Holding a database of all available games and stats for them in memory for example.

Try the alternatives included in classicWB like the games commodity and my favorite is Zetros AG-launch. It's intended for low memory usage and is just a fancy amigaguide document, very fast. See if you have the same trouble with those.
jimbob is offline  
Old 21 February 2014, 15:19   #5
Mrs Beanbag
Glastonbridge Software
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,202
Quote:
Originally Posted by Amicol View Post
I've always wondered why my A1200 steadily loses fastmemory during use.
Starting up Igame, various WHDLoad games, the memory doesn't seem to get reclaimed when they are exited.
I have to reboot the system to get my free RAM back.

Is this normal? And if so, why?
AmigaDOS doesn't track which processes reserved which bits of memory so it's the responsibility of the programmer to free them up, the OS can't do it automatically when the process exits.
Mrs Beanbag is offline  
Old 21 February 2014, 15:23   #6
Amicol
Registered User

 
Join Date: Dec 2013
Location: Hartlepool / England
Posts: 338
Quote:
Originally Posted by jimbob View Post
How much RAM do you have? My A600 has 32mb so I'm not sure I would have encountered this trouble anyway but I don't use igame, it's nice but takes forever to start.
I have 16mb Fast 2mb Chip. Every time Igame starts it uses 2mb Fast, and you don't get it back when it exits.
I'll try the other options, but Igame is really handy, and fast on my A1200
Amicol is offline  
Old 21 February 2014, 15:44   #7
Amicol
Registered User

 
Join Date: Dec 2013
Location: Hartlepool / England
Posts: 338
Quote:
Originally Posted by Mrs Beanbag View Post
AmigaDOS doesn't track which processes reserved which bits of memory so it's the responsibility of the programmer to free them up, the OS can't do it automatically when the process exits.
Very interesting, I didn't know that. Thanks!
At least I know there's nothing wrong
Amicol is offline  
Old 21 February 2014, 17:04   #8
edd_jedi
Registered User
edd_jedi's Avatar
 
Join Date: Apr 2010
Location: London / UK
Posts: 396
I noticed last week while copying several GB of data from one drive to another in DOpus that the fast/chip memory were both being eaten up, and eventually it stopped copying because it had run out of memory. I had to exit DOpus, run Clear Ram and pick up where I left off.

It seems the Amiga has a built in inability to claw back memory?
edd_jedi is offline  
Old 21 February 2014, 18:46   #9
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 1,751
It is not normal, but as Mrs Beanbag wrote the programm is responsible for allocating and deallocating its memory. So the coder might forgot it or a bug is responsilbe or other tools/hacks. You can easily check that by yourself. Open a shell and type "avail", start the progamm you want to test, maybe again "avail" in the shell, exit the programm and another "avail". If you compare the memory values you can see if memory is lost. There exists memwatch tools with GUI if you need.

If you a programm loses memory you should write a bugreport to the author. So he/she can fix it.

If a programm uses other resources like e.g. libraries these will load to memory. If the programm don`t close it on exit it will stay in memory. There is an open counter for libs, devices, resources that counts how many programms "use" it. A "avail flush" tries to free memory as much as possible. E.g. an lib has an open couter of 0 then "avail flush" remove it. If counter is 1 or higher then the lib will stay.

IGame uses MUI, hence a lot of memory but I guess that isn`t the problem.
daxb is offline  
Old 21 February 2014, 22:27   #10
Mrs Beanbag
Glastonbridge Software
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,202
I sometimes wondered about the possibility of patching the OS so it keeps track of who reserved the memory. Problem is programs sometimes send each other data as pointers so the program that reserved the memory isn't necessarily the one using it when it exits. So freeing it automatically could cause unexpected things to happen. But it could be used for diagnostic purposes or allow you to free blocks manually or somesuch.

Maybe this already exists on Aminet, I haven't looked.
Mrs Beanbag is offline  
Old 21 February 2014, 22:32   #11
Retro-Nerd
Missile Command Champion

Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 45
Posts: 10,745
I use ClassicWB with TinyLauncher. WHDLoad always restores the fastmem after pressing the quit key. Has to be a software problem with Igame (or others) then.

Last edited by Retro-Nerd; 21 February 2014 at 22:39.
Retro-Nerd is offline  
Old 21 February 2014, 22:55   #12
Retrofan
Ruler of the Universe

Retrofan's Avatar
 
Join Date: Mar 2010
Location: Lanzarote/Spain
Posts: 5,667
Send a message via Skype™ to Retrofan
I've never had a problem with the memory since I use CyberbugfixAga. It is also an option for CWBOS3.9. I can run perfectly well 256 colors and an screen 800x600 (1.500.000 free chip mem). The only problem with that is the slowdown of a real system.
Retrofan is offline  
Old 22 February 2014, 01:26   #13
Amicol
Registered User

 
Join Date: Dec 2013
Location: Hartlepool / England
Posts: 338
Quote:
Originally Posted by Retrofan View Post
I've never had a problem with the memory since I use CyberbugfixAga. It is also an option for CWBOS3.9. I can run perfectly well 256 colors and an screen 800x600 (1.500.000 free chip mem). The only problem with that is the slowdown of a real system.
Thanks mate, that cyberbugfix did the trick!

Well it doesn't seem as bad....
Amicol is offline  
Old 22 February 2014, 01:34   #14
Mrs Beanbag
Glastonbridge Software
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,202
I might actually try writing a patch to keep track of who reserved memory, it would be very useful for debugging my own programs if nothing else.
Mrs Beanbag is offline  
Old 22 February 2014, 11:05   #15
Leandro Jardim
Registered User
Leandro Jardim's Avatar
 
Join Date: Nov 2009
Location: Legoland
Age: 38
Posts: 1,152
There are some patches that I use which may be of some use for other people, guys...

"MemOptimizer" keeps looking for usused libraries ocupying RAM and discards them from memory when memory is low. Its like an automatic ...
Code:
C:Avail FLUSH
... only that you doesnt need to open a shell window to write the command.

"MegaSpace" is one example of an excellent idea. It checks RAM and disks for low space and can automatically execute a shell script that the user can choose to clear memory and wipe temporary directories. With the right program (found on Aminet), it can be used to kill commodities when the RAM memory is low.

http://aminet.net/package/util/misc/MegaSpace102
http://aminet.net/package/util/boot/MemOptimizer
Leandro Jardim is offline  
Old 22 February 2014, 13:17   #16
Mrs Beanbag
Glastonbridge Software
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,202
it looks like MemOptimizer does loads of cool stuff to speed up operations, too.

Neither can fix genuine user-program memory leaks, though
Mrs Beanbag is offline  
Old 22 February 2014, 13:37   #17
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 1,751
MemOptimizer is a memory defrag tool, so not a "avail flush" replacer what does more or less the oposite. Cut from the docs:

"The purpose of this program is to periodically check your Amiga's free memory list(s) and automatically remove all memory fragments (chunks) which are smaller than a given threshold value. This will optimize memory allocations, as the lists become shorter and hence can be searched faster."
daxb is offline  
Old 22 February 2014, 14:05   #18
Leandro Jardim
Registered User
Leandro Jardim's Avatar
 
Join Date: Nov 2009
Location: Legoland
Age: 38
Posts: 1,152
Quote:
Originally Posted by daxb View Post
MemOptimizer is a memory defrag tool, so not a "avail flush" replacer what does more or less the oposite. Cut from the docs:

"The purpose of this program is to periodically check your Amiga's free memory list(s) and automatically remove all memory fragments (chunks) which are smaller than a given threshold value. This will optimize memory allocations, as the lists become shorter and hence can be searched faster."
I read the docs too, like you, but I am unsure if the inner workings of the program is really like it says...

Its very hard for the patch to do really this, if only the author of a program knows how it uses its memory and if the chunks it allocates can be freed or not. The only way to do this would be with a MMU but in this case the program doesnt uses one.

The program could also walk into the OS data structures and remove only some libraries or other shared objects, for example, but in any way or other, this is exactly what Avail FLUSH does, to some extent. There are some defragmentizers for AmigaOS, another one is PoolMem, but a true defragmentizer would need a MMU to "mark" where the memory addresses belong to.
Leandro Jardim is offline  
Old 22 February 2014, 16:29   #19
Bloodwych
Moderator

Bloodwych's Avatar
 
Join Date: Jun 2001
Location: I'm behind you!
Posts: 3,763
I run ClassicWB FULL and dont really notice this - using iGame and the last WHDLoad version 17.1? Never tried WHDLoad 17.2 yet. A1200 WinUAE config with 2MB chip 8MB fast.

iGame uses some memory initially, but some of this is recoverable via ClearRAM then after that it really doesn't change after launching a few games:

eg 7,000k fastram free after boot, 6600k free after exiting WHDLoad games and iGame, 6700k free after ClearRAM. Of course the Amiga steadly will not reclaim all RAM and will need a reboot eventually due to limitations of the Workbench and programs use of memory as described above, but since the Amiga boots so fast and I rarely use it for more than a few hours at a time I've never found it much of an issue.

Perhaps a few specific WHDLoad games don't release memory, but I've never noticed it as a huge problem. Are you using a different version of ClassicWB, the non-Scalos versions perhaps? Haven't really tested those in depth with launching many games through iGame (eg OS35 39 LITE 68k GAAE) so they may exhibit the memory leak problem you are referring to.

It may also act different on a real Amiga, or one of the patches is causing the problem - those can be disabled one by one under the settings menus.

Last edited by Bloodwych; 22 February 2014 at 16:36.
Bloodwych is offline  
Old 22 February 2014, 16:45   #20
Amicol
Registered User

 
Join Date: Dec 2013
Location: Hartlepool / England
Posts: 338
Quote:
Originally Posted by Bloodwych View Post
I run ClassicWB FULL and dont really notice this - using iGame and the last WHDLoad version 17.1? Never tried WHDLoad 17.2 yet. A1200 WinUAE config with 2MB chip 8MB fast.

iGame uses some memory initially, but some of this is recoverable via ClearRAM then after that it really doesn't change after launching a few games:

eg 7,000k fastram free after boot, 6600k free after exiting WHDLoad games and iGame, 6700k free after ClearRAM. Of course the Amiga steadly will not reclaim all RAM and will need a reboot eventually due to limitations of the Workbench and programs use of memory as described above, but since the Amiga boots so fast and I rarely use it for more than a few hours at a time I've never found it much of an issue.

Perhaps a few specific WHDLoad games don't release memory, but I've never noticed it as a huge problem. Are you using a different version of ClassicWB, the non-Scalos versions perhaps? Haven't really tested those in depth with launching many games through iGame (eg OS35 39 LITE 68k GAAE) so they may exhibit the memory leak problem you are referring to.

It may also act different on a real Amiga, or one of the patches is causing the problem - those can be disabled one by one under the settings menus.
I was using a hacked set of roms, now changed them to a standard set of 3.1 and all is good :-) there must have been some problem with the custom rom. I love your Classic Workbench flavours, been using them for years

Mmmmm, the system runs a LOT slower with standard 3.1 Roms. Will try and make a custom set that works fast, and no memory problems.

Last edited by Amicol; 22 February 2014 at 16:59.
Amicol 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
Adding more then 8 MB of Fast Memory in WINUAE? Kenan support.WinUAE 3 16 June 2013 20:20
Use of 4MB PCMCIA Fast Flash Memory as Fast RAM in A1200 nkarytia support.Hardware 10 16 September 2011 14:37
Amiga 4000 (changing of fast memory at 60ns via software) dir_marillion support.Hardware 3 15 May 2006 22:36
Graphics card memory->Amiga fast ram? manicx support.Hardware 9 31 July 2003 17:19
Max Fast Memory In WinUAE CodyJarrett support.WinUAE 11 19 April 2002 22:18

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 18:01.


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