A run file made two ways:
With variables:
/$appPath/$file ; /$callPath/$caller
Or with literals:
/11111/22222/33333/fileName ; /aaa/bbb/ccc/callingApp
The variables in the first one hold the same strings as the second one.
The file stays in memory while the app. runs, and exits when it does.
I think that the memory foot-print is the same for both.
File foot-print in memory. Variables vs literals.
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
using the string directly oncd should be slightly smaller, but ...
if you plan to use it more than once - use a variable
if you dont want to have incomprehensible "magic numbers" - use a variable
if you may eventually use it more than once - use a variable
if it may change - use a variable (much easier to change it in one place)
if the string already exists in a variable - use a variable (unless an outside source might change it and bork your script)
if you plan to use it more than once - use a variable
if you dont want to have incomprehensible "magic numbers" - use a variable
if you may eventually use it more than once - use a variable
if it may change - use a variable (much easier to change it in one place)
if the string already exists in a variable - use a variable (unless an outside source might change it and bork your script)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
Hey technosaurus; I figured they were close to the same size in memory.
This is to go into a Squash file app. to run it`s exec. and stays in memory.
So I want it to be as small as possible being as it "hangs" in memory.
When the app. ends, this script calls the mount script to unmount the Squash.
Variable script:
Usage: /Path/SqMountPt/run /Path/SqMountPt $0 &
To use the mount script: app.sq_run /Path/SqAppFile
Literal script:
The mount points are always different, the path to them is always the same.
And ultimately, quite often apps. have their exec. files in different places.
The run script is generated just before the Squash app. file is made.
.
This is to go into a Squash file app. to run it`s exec. and stays in memory.
So I want it to be as small as possible being as it "hangs" in memory.
When the app. ends, this script calls the mount script to unmount the Squash.
Variable script:
Code: Select all
$1/bin/Exec ; $2 -x $1 &
To use the mount script: app.sq_run /Path/SqAppFile
Literal script:
Code: Select all
/Path/SqMountPt/bin/Exec ; app.sq_run -x /Path/SqMountPt &
And ultimately, quite often apps. have their exec. files in different places.
The run script is generated just before the Squash app. file is made.
.