#include <dpmi.h> int _go32_dpmi_allocate_dos_memory(_go32_dpmi_seginfo *info);
See section DPMI Overview
Allocate a part of the conventional memory area (the first 640K). Set
the size
field of info to the number of paragraphs
requested (this is (size in bytes + 15)/16), then call. The
rm_segment
field of info contains the segment of the
allocated memory.
The memory may be resized with _go32_dpmi_resize_dos_memory
and
must be freed with _go32_dpmi_free_dos_memory
.
If there isn't enough memory in the system, the size
field of
info has the largest available size, and an error is returned.
See section dosmemput See section dosmemget
Zero on success, nonzero on failure.
not ANSI, not POSIX
_go32_dpmi_seginfo info; info.size = (want_size+15) / 16; _go32_dpmi_allocate_dos_memory(&info); dosmemput(buffer, want_size, info.rm_segment*16); _go32_dpmi_free_dos_memory(&info);
Go to the first, previous, next, last section, table of contents.