next up previous contents index
Next: 6.12.1 osenv_memflags_t: memory allocation Up: 6 OSKit Device Driver Previous: 6.11.1 dev.h: common device

6.12 Driver Memory Allocation

The OS must provide routines for drivers to call to allocate memory for the private use of the drivers, as well as for I/O buffers and other purposes. The OSKit device driver framework defines a single set of memory allocation functions which all drivers running under the framework call to allocate and free memory.

Device drivers often need to allocate memory in different ways, or memory of different types, for different purposes. For this reason, the device driver framework defines a set of flags provided to each memory allocation function describing how the allocation is to be done, or what type of memory is required.

As with other aspects of the OSKit device driver framework, the libdev library provides default implementations of the memory allocation functions, but these implementations may be replaced by the OS as desired. The default implementations make a number of assumptions which are often invalid in ``real'' OS kernels; therefore, these functions will often be overridden by the client OS. Specifically, the default implementation assumes:

Additionally, the default routines which deal with physical memory addresses make these assumptions:





University of Utah Flux Research Group