13 March 2014, 21:34 | #1 |
BoingBagged
Join Date: Aug 2007
Location: The South of nowhere
Age: 46
Posts: 2,358
|
Memory hungry Amigados scripts
Lately, I have been creating script based applications for the Amiga. Nothing groundbreaking really, but very handy indeed.
The thing is, that I have noticed that to properly run those amigados scripts that were started with iconx, I need at least 178KB of free memory, if not the script will, at some point, fail due to low memory. What I find frustrating, is that the script is not long and not complex, it just checks some conditions, and executes yet another script that contains a couple of lines with the copy command. So am I doing something wrong, that all my scripts eat so much memory? Is there a way to overcome this? I´d apreciate any hint. |
13 March 2014, 22:13 | #2 |
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
Can you please attach the scripts so we can have a closer look?
It will be hard to say what is wrong without looking at them first. |
13 March 2014, 22:40 | #3 |
BoingBagged
Join Date: Aug 2007
Location: The South of nowhere
Age: 46
Posts: 2,358
|
Thank you for your answer.
I am attaching one of these little creatures I made. you should uncompress and copy all files respecting their location for the script to work. It is designed to work under AmigaOS 3.1. The application is called Rebooter and its docs are located under the Locale/Help/ drawer. The application should be able run from both workbench and cli. Remeber to issue a protect +s to the scripts so that Amigados doesnt complain. I am all ears Last edited by gulliver; 17 March 2014 at 19:41. |
13 March 2014, 23:42 | #4 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,303
|
Maybe it is the amount of copy buffer used. You can test it by echo the copy/delete lines, so they are just printed. Or try to get more information about memory usage with "avail" commands in the script.
ps: Why don`t you use Requestchoice what comes with OS3.1 and is there a reason for so many subscripts? |
14 March 2014, 00:33 | #5 | |
BoingBagged
Join Date: Aug 2007
Location: The South of nowhere
Age: 46
Posts: 2,358
|
Quote:
Many scripts are required, but it does not change a thing if I reduce them, or use requestchoice. Another example, is the IconSet script I have in BetterWB (it uses requestchoice), and it only calls one other script. It fails the same way when copying glowicons when the memory available is under 178KB. |
|
14 March 2014, 12:46 | #6 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,303
|
First, my "avail" command advice wasn`t good. Did you tried to set copy buffer to a lower value (e.g. "BUF=10")? Some days ago I read here on eab that the default buffer is 100 or 200 (each 512 byte?) and is allocated in one chunk. And there is a bug in copy <40.1.
I asked the questions because it looked unnecessary complicated to me but you may call the scripts from various places what would make sense. Not because of memory usage. |
14 March 2014, 12:57 | #7 |
BoingBagged
Join Date: Aug 2007
Location: The South of nowhere
Age: 46
Posts: 2,358
|
It is not the copy bug you mention, as I have tried different copy command clones, and I get the same end result.
I am starting to believe, it is a fact of life in Amigados land that the memory requirements are so unnecesary high. I apreciate your comments and suggestions, I already did some modifications to the scripts as you suggested. I will try to modify the copy buffer as you mentioned, and report back. |
17 March 2014, 19:43 | #8 |
BoingBagged
Join Date: Aug 2007
Location: The South of nowhere
Age: 46
Posts: 2,358
|
@daxb
Thank you very much! Setting the copy buffer to a low value decreased the amount of memory used by the scripts to something very reasonable. |
18 March 2014, 13:41 | #9 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,303
|
Nice that it works better for you. I assign the "thank" to the user(s) who wrote about the copy buffer because I just parroted that.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
AmigaDOS scripts | lloyd | Coders. General | 2 | 22 November 2004 19:47 |
|
|