qc.hlp (Table of Contents; 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.
_bheapseg
 Summary Example                         Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     The _bheapseg function allocates a based-heap segment of at least
     <size> bytes. (The block may be larger than <size> bytes because
     of space required for alignment and for maintenance information.)
 
     The heap code tries to enlarge the heap as necessary. If the
     original block of memory is depleted (e.g., by calls to _bmalloc
     and _brealloc), the run-time code tries to enlarge the heap as
     necessary.
 
     The value returned by _bheapseg is the identifier of the based-
     heap segment. This value should be saved and used in subsequent
     calls to other based-heap functions.
 
     The _bheapseg function can be called repeatedly. For each call,
     the C library allocates a new based-heap segment.
 
     Return Value
 
     The _bheapseg function returns the newly allocated segment
     selector to be saved for use in subsequent based-heap functions.
     A return value of -1 indicates failure.
 
     Always check the return from the _bheapseg function (especially
     when it is used in real mode), even if the amount of memory
     requested is small.
                                    -♦-