上传日期:2001-05-15 17:43:37
上 传 者管理员
说明:  一个堆栈管理器的源码
( A storehouse management source code )

CHEAP.LIB (41989, 1990-03-02)
HEAP.H (15044, 1990-03-02)
HEAP.MAN (84126, 1990-03-02)
HEAPINFO.TXT (54844, 1990-03-02)
LHEAP.LIB (41989, 1990-03-02)
MHEAP.LIB (36835, 1990-03-02)
PACKING.LST (705, 1990-03-03)
README.TXT (3223, 1990-03-03)
SHEAP.LIB (36835, 1990-03-02)
STDMSC.C (2015, 1990-03-02)

Introduction to the Replacement Heap Manager -------------------------------------------- The enclosed software is a library of heap management routines compatible with MSC 5.1. It consists of the basic heap manager, which is fully compatible with the original, but provides superior performance, the extended capability package, which provides user programs with control over the behavior of the heap, and the heap debugging package, which adds error checking routines to the basic heap operations. The replacement heap library manages the heap in such a way as to limit the fragmentation of the heap, and, with the global free list, optimize the speed of heap operations. It also offers the following benefits: - automatic recovery of space wasted in the default data segment - rational handling of zero-length entries and NULL pointers - precise control over the interface with the DOS memory manager - consistent treatment of "far" and "huge" heap entries The extended capabilities of the replacement heap manager include: - relocation of heap entries for garbage collection and heap compaction - shrinking the heap, and releasing excess memory back to DOS to maximize the space for spawned programs - user control over the behavior of the heap manager offers LIFO, first-fit, and best-fit algorithms - detailed reports on the state of the heap for analysis of heap usage and behavior - extended versions of standard functions for "huge" heap entries (_hexpand, _hmsize, and hrealloc). - direct access to the heap control data structures - heap manager accepts non-DOS memory as a resource The replacement heap manager is less vulnerable to corruption than the original. It also provides the following tools for identifying heap-related problems: - distinctive heap pointers reduce possibility of heap corruption - user controlled safety margins on every allocation - detailed consistency checks, including heap-control-block reciprocity and safety margin integrity - debugging versions of heap functions check heap integrity and report errors. - tracing versions of heap functions report heap transactions including parameters and return values. - read-only heap entries may be monitored for unanticipated changes Further information is avaiable in the file heapinfo.txt which contains a detailed description of the operation of the replacement heap manager, and the file heap.man which contains a reference manual for the heap management functions. FAIR WARNING: This version of the heap manager has no known bugs, and and passes a battery of tests designed to exercise it. However, it has not been around very long, so the possibility exists that there are residual bugs still in existence.