Methods and systems for allocating address space resources to resource
requesting peripheral devices in an efficient manner. Resource request
are gathered for enumerated peripheral devices host by a computer
platform. A map containing resource alignment requirements is built, and
a virtual resource allocation map is computed based on aggregated
resource requests and the alignment requirements. The resource
aggregations are, in turn, based on a hierarchy of the peripheral
devices. A bin-packing algorithm is employed to determine allocation of
the resource requests so as to minimize resource address space
allocations. The virtual resource map is then used to perform actual
resource allocations. The resources include peripheral device I/O address
allocation and peripheral device memory address allocations.