English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   Amiga scene (http://eab.abime.net/forumdisplay.php?f=2)
-   -   A1200 Loses Fast Memory (http://eab.abime.net/showthread.php?t=72650)

Amicol 21 February 2014 14:24

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? :confused

fitzsteve 21 February 2014 14:31

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?

Amicol 21 February 2014 14:39

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....

jimbob 21 February 2014 15:05

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.

Mrs Beanbag 21 February 2014 15:19

Quote:

Originally Posted by Amicol (Post 939342)
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? :confused

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.

Amicol 21 February 2014 15:23

Quote:

Originally Posted by jimbob (Post 939349)
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 21 February 2014 15:44

Quote:

Originally Posted by Mrs Beanbag (Post 939352)
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 :D

edd_jedi 21 February 2014 17:04

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?

daxb 21 February 2014 18:46

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.

Mrs Beanbag 21 February 2014 22:27

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.

Retro-Nerd 21 February 2014 22:32

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.

Retrofan 21 February 2014 22:55

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.

Amicol 22 February 2014 01:26

Quote:

Originally Posted by Retrofan (Post 939442)
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! :great

Well it doesn't seem as bad....

Mrs Beanbag 22 February 2014 01:34

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.

Leandro Jardim 22 February 2014 11:05

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

Mrs Beanbag 22 February 2014 13:17

it looks like MemOptimizer does loads of cool stuff to speed up operations, too.

Neither can fix genuine user-program memory leaks, though

daxb 22 February 2014 13:37

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."

Leandro Jardim 22 February 2014 14:05

Quote:

Originally Posted by daxb (Post 939537)
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.

Bloodwych 22 February 2014 16:29

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.

Amicol 22 February 2014 16:45

Quote:

Originally Posted by Bloodwych (Post 939555)
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 :great

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. ;)


All times are GMT +2. The time now is 12:26.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.

Page generated in 0.04652 seconds with 11 queries