I have been reworking a device driver for a high-end, high-performance networking card and I have a resource allocation problem. The devices I am working with have several network ports, but these are not always in use; in fact, many of our customers use only one of the four available ports. It would greatly simplify the logic in my driver if I could allocate the resources for all the portsno matter how many there arewhen the device driver is first loaded into the system, instead of dealing with allocation whenever an administrator brings up an interface.
I should point out that this device has a good deal of complexity and the resource allocation is not as simple as a quick malloc of memory and pointer jigglinga lot of moving parts are inside this thing.