◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back► ─────Run-Time Library─────────────────────────────────────────────────────── The _bheapseg function allocates a based-heap segment of at least <size> bytes. (The block can be larger than <size> bytes because of space required for alignment and for maintenance information.) 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. If the original block of memory is depleted (e.g., by calls to _bmalloc and _brealloc), the run-time code will try to enlarge the heap as necessary. The _bheapseg function can be called repeatedly. For each call, the run-time 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 _NULLSEG 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. -♦-