bas7advr.hlp (
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
SETMEM Function Details
◄Syntax► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
SETMEM changes the amount of memory used by the far heap--the area where
far objects are stored--and returns information about the far heap.
SETMEM(numeric-expression&)
■ If numeric-expression& is negative, SETMEM decreases the far heap
by the indicated number of bytes.
■ If numeric-expression& is positive, SETMEM attempts to increase
the far heap by the number of bytes.
Usage Notes
■ If SETMEM cannot change the far heap by the requested number of
bytes, it reallocates as many bytes as possible.
■ SETMEM can be used in mixed-language programming to decrease the
far heap space so procedures in other languages can dynamically
allocate far memory.
■ For more information on memory allocation, see Chapter 15,
"Optimizing Program Size and Speed" in the Programmer's Guide.
Programming With OS/2 Protected Mode
■ The SETMEM function performs no other function than to return a
dummy value. This value is the previous SETMEM value adjusted by
the SETMEM argument. The initial value for SETMEM is 655,360.
Important
■ A first call to SETMEM trying to increase the far heap has no
effect because BASIC allocates as much memory as possible to the
far heap when a program starts.