On 15 February 2018 at 19:33, Tobias Fröschle via Ql-Users <
ql-users@lists.q-v-d.com> wrote:

> > 1. Not called from an S*BASIC context: --> return with nothing done, d0
> is what you put in, so not meant to report an error. Not really a valid use
> case
> This _is_ a valid use case for compiled programs - But here we should be
> safe to assume that the compiler runtime environment has some space
> reserved for us - We cannot expect QDOS/SMSQ/E to do that

At least it could exit when an 'out of memory' situation occurs, rather
than let the program continue assuming there's enough space where in fact
there isn't.

What puzzles me however is that, in case more space from the system is
needed, this is done using a call to sms.achp (mt.alchp) rather than
mt.albas. So the extra space seems to be allocated in the Common Heap
rather than the S*BASIC area. Now I know that SMSQ/E has a memory
allocation scheme that's different from good old QDOS in some respects, but
I'm curious about the rationale behind this. When space for the RI stack
(or any other S*BASIC area for that matter) is allocated from the Common
Heap, there would be no problem extending this to compiled programs
(assuming they won't expect their data to be somewhere in the TRNSP area).

Does anyone have a clue?


*Jan Bredenbeek* | Hilversum, NL | j...@bredenbeek.net
QL-Users Mailing List

Reply via email to