Note: This API call is for DOS and Win16 personality only. Use Family API for portability.
2.11 and higher
SET MEMORY ALLOCATION STRATEGY
AH = 58h AL = 01h BL = new allocation strategy (see #01679) BH = 00h (DOS 5+)
CF clear if successful CF set on error AX = error code (01h) (see #01680)
the Get subfunction returns the last value set
setting an allocation strategy involving high memory does not automatically link in the UMB memory chain; this must be done explicitly with AX=5803h in order to actually allocate high memory
a program which changes the allocation strategy should restore it before terminating
Toshiba MS-DOS v2.11 supports subfunctions 00h and 01h, as does the TI Professional MS-DOS v2.13
DR DOS 3.41 reportedly reverses subfunctions 00h and 01h
Values for DOS memory allocation strategy:
00h | low memory first fit |
01h | low memory best fit |
02h | low memory last fit |
—DOS 5+ — | |
40h | high memory first fit |
41h | high memory best fit |
42h | high memory last fit |
80h | first fit, try high then low memory |
81h | best fit, try high then low memory |
82h | last fit, try high then low memory |
Text based on Ralf Brown Interrupt List Release 61
osFree Macro Library | |
---|---|
Video I/O | @SetMode @SetCurSz @SetCurPos @GetCur @SetPage @ScrollUp @ScrollDn @Scroll @GetChAtr @PutChAtr @PutCh @SetPalet @SetColor @SetDot @GetDot @WrtTTY @VideoState @GetMode @GetDisplay @GetVideoState @GetEGAInfo @Cls |
Hardware info | @Equipment @MemSize |
Serial I/O | @AuxInit @AuxSendChar @AuxRecieveChar @AuxStatus |
Tape I/O | @TapeOn @TapeOff @TapeRead @TapeWrite |
Keyboard I/O | @KbdStatus @CharIn @CharPeek |
Printer I/O | @PrnPrint @PrnInit @PrnStatus |
Disk I/O | @DskReset @DskStatus @DskRead @DskWrite @DskVerify @DskFormat |
Date and Time | @SetTime @GetTime |
Mouse | @MouInit @MouShowPointer @MouStatus @MouSetPos @MouSetMickey @MouRegion |
Memory manager | @ModBlok SET_BLOCK |