Hi All,
I am reading some docs on QL assembly, along with QL Technical Guide.
I wish to learn more about QDOS heap management. I undesrtand that it maintains chained links of free and allocated blocks. The blocks are movable, and a relative pointer is therofore needed to access data in a user block.
But when does QDOS actually move blocks arround? Am I save that my block will not move when I write to or read from it, so I get valid data? Or do I have to care at all?
Many thanks in advance.
Tom
ALCHP Common Heap
Re: ALCHP Common Heap
That's right. QDOS does, however, allocate memory for various purposes in various pools.tcat wrote:Hi All,
I am reading some docs on QL assembly, along with QL Technical Guide.
I wish to learn more about QDOS heap management. I undesrtand that it maintains chained links of free and allocated blocks.
The QDOS documentation is a bit vague in that respect - Memory you allocate through system calls like MT.ALLOC, MM.ALLOC or RESPR ( that is "ALLOCATION", "ALCHP" or "RESPR") is allocated at fixed addresses and won't move.tcat wrote: The blocks are movable, and a relative pointer is therofore needed to access data in a user block.
Memory allocated for SuperBASIC (like the name table, Basic variables, Basic Buffer area and some such) is, however, part of the SuperBASIC job and therefore movable (and thus always has to be addressed A6-relative).
As above: SuperBASIC may move, but nothing in other jobs. If you're writing a SuperBASIC extension, you need to care (and address everything relative to A6), if you're writing a separate Job, you don't need to care.tcat wrote:
But when does QDOS actually move blocks arround? Am I save that my block will not move when I write to or read from it, so I get valid data? Or do I have to care at all?
Tobias
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO