allocmem() Allocate DOS Memory Segment
#include <dos.h>
int allocmem(size,seg);
unsigned size; Size in paragraphs
unsigned *seg; Pointer to segment address
allocmem() allocates a block of free memory via the MS-DOS system
call 0x48. The segment address of the allocated block is returned.
'size' is the desired size in paragraphs. 'seg' is a pointer to the
word to be assigned the segment address of the allocated block. If
there is not enough room, no assignment is made.
Returns: -1 is returned on success. On error, a value
representing the size of the largest available block is
returned.
Note: All allocated blocks are paragraph aligned.
Use freemem() to free memory allocated by allocmem().
Seealso:
This page last updated on Fri Nov 30 10:48:32 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster