摘要 |
The present invention is embodied in a system and method for generating and validating reference handles for consumers requiring access to resources in a computer system. The system of the present invention includes a resource manager (200) having a handle administrator (230), a plurality of consumers (212-216), and a plurality of resources (218-222). The handle administrator includes an assignment routine (310), a release routine (314), and a dereference routine (312). The assignment routine (310) issues new handles, the release routine (314) releases handles that are no longer required (thus rendering the handle invalid), and the dereference routine (312) dereferences handles into a pointer to a resource, which entails verifying that the handle is valid. Also included is an auxiliary sub-routine (402) for managing used and unused records, an expansion sub-routine (404) for efficiently expanding the handle database, a handle recycling sub-routine (406) for recycling handles, a contraction sub-routine (434) for efficiently contracting the handle database, a hysteresis sub-routine (436) for probabilistically contracting the handle database, and a memory allocation failure sub-routine (414) to improve functionality in the event of memory allocation failure. |