From Newsgroup: comp.sys.acorn.programmer
In article <
5ce8cb00a3bob@sick-of-spam.invalid>,
Bob Latham <
bob@sick-of-spam.invalid> wrote:
In article <5ce8c3e7b9News04@avisoft.f9.co.uk>,
Martin <News04@avisoft.f9.co.uk> wrote:
What language are you using?
Basic assembler, I somehow feel I should apologise for that.
Not if you are up for the increased development and maintenance times.
And incompatibility with 64-bits!
You could...
I'm looking for memory that I can "claim?" (2MB-ish) and release
again with ease and has easy direct addressable space.
My feelings about these options are based on poor knowledge I'll
admit but
- allocate a large enough slotsize when your app starts.
This particular job is one of many my application performs. It will
not be used often and so a big claim at the start does not seem
ideal to me.
Is the 'job' a single-tasking program, or a Wimp task?
Claiming a large area at the start of an infrequently used job is
fine ... unless perhaps it runs for a very long time.
But 2MB is not large. This is virtual memory, not real stuff!
- change slotsize dynamically using SWI Wimp_SlotSize.
I *think* that limit has got much higher with OS5 and it may do the
job but I'm sure I've played with extending a app space in the past
and I didn't enjoy the experience. :-)
The limit was 28MB even before RO5, now even higher.
I frequently use 10's megabytes!
Just a matter of keeping track of the start and end addresses of your
extra space, and ensuring you do not write outside those limits!
- set up a Dynamic Area and use that.
I may have done that many years ago but can't remember what's
involved but it does have the most appeal with my shallow knowledge.
Is it hard to do?
No - use OS_DynamicArea to create (and remove) an area.
I've just found some info in PRM5a, I'm reading and understanding
some of it. :-)
- claim some RMA, but probably not a good idea these days.
I didn't realize or forgotten that was different from Dynamic Area.
--
Martin Avison
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received.
--- Synchronet 3.22a-Linux NewsLink 1.2