Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Before allocating memory, the application has to know in which bank the requested memory area is located. OS_Fma provides that job with plenty of options. All those options have to be specified if required, they are not copied from OS_Mop. An even bank number can be requested since segment 0 can only be allocated with such banks (FM_EVN option). Remember that if an odd RAM bank is bound to segment 0, the upper half of the previous even bank will be bound to $2000-$3FFF (an even bank number is bound to $2000-$3FFF with lower half of that bank). A fixed memory (not subject to swapping) can be requested (FM_FIX option), this is useful if your application is not a popdown and does not release this memory when suspended. An explicit slot (FM_Cx option) can be specified or any (FM_ANY option) of them letting routine scan all slots for requested memory. If successful, the bank number is returned in B. Offset address can be automatically generated by OS_Fma with the FM_NOF option. This feature is often used when memory offset does not matter like data storage, buffers or relocatable code. In that case, it is preferable and easiest to use OS_Mal with large block specified in BC.

...

Memory allocation is provided by OS_Axp or OS_Axm following an OS_Mop. During opening, memory allocations flags options are set for all the session pool : MM_SLT, MM_EXC, MM_MUL, MM_FIX. Only MM_FIX is handled Those allocation options are ignored by explicit allocation calls, they are only relevant for OS_Mal. OS_Mop returns a memory handle which will be mandatory for all further allocation calls.

...