Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Martin Newsgroups: comp.sys.acorn.programmer Subject: Re: Temporary memory Date: Sun, 14 Jun 2026 13:13:25 +0100 Organization: None Lines: 55 Message-ID: <5ce8cdeaf6News04@avisoft.f9.co.uk> References: <5ce8bbe2c2bob@sick-of-spam.invalid> <5ce8c3e7b9News04@avisoft.f9.co.uk> <5ce8cb00a3bob@sick-of-spam.invalid> Injection-Date: Sun, 14 Jun 2026 12:13:36 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3801028"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18JRr2I0GjhU/JiSx2zZW4F"; posting-host="6127fb957dc7812d5d14d8eb8cd4bb85" User-Agent: Pluto/3.21a (RISC OS/5.31) NewsHound/v1.54 Cancel-Lock: sha1:jSaFdX/KwCX41vMytx0V+WqhKto= sha256:AFwM8m0/nWd8I8TWviZv6Ummw3CmysAkV6Xdt9ckaAw= sha1:V+hkZlrerLhdPQoT2PYigQ2oaFI= Xref: csiph.com comp.sys.acorn.programmer:6654 In article <5ce8cb00a3bob@sick-of-spam.invalid>, Bob Latham wrote: > In article <5ce8c3e7b9News04@avisoft.f9.co.uk>, > Martin 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.