Interesting. I'm guessing that this frees the existing workspace (including the current program, hence not being allowed in code) and allocates a new one. All modern operating systems support reserving contiguous address space without actually allocating memory, which simplifies things and means it's possible to increase the workspace without having to discard an existing program.Soruk wrote: ↑Fri Jan 15, 2021 10:03 amYou can, but not within a program, resize the workspace by doing:Code: Select all
NEW (256*1048576)
My BASICs reserve either 256 Mbytes (BBCSDL) or 512 Mbytes (BB4W) of contiguous address space, if available (less if not), and then initially allocate the bottom 2 Mbytes of that (so HIMEM is set a little less than 2 Mbytes above PAGE). But HIMEM can subsequently be raised up to the maximum of the reserved space without anything being lost, and hence it's OK to do it within a program.
I wonder if Brandy doesn't do this for reasons of compatibility with 'ancient' operating systems like RISC OS which (perhaps) don't fully support Virtual Memory, but that's just speculation.