next up previous contents
Next: 2.5 Hardware resources Up: 2.4.9 Allocators used in Previous: 2.4.9.5 The paging block

2.4.9.6 Kernel allocators C++ source files

The indexer is found in klib/Indexer.h

<Indexer.h*>=
<Read the literate code instead warning. >
#ifndef __OFF_INDEXER_H
#define __OFF_INDEXER_H 1

<Off indexer dependencies. >

#ifdef __KERNEL__
<Off indexer. >
<Off indexable. >
#endif // __KERNEL__

#endif // __OFF_INDEXER_H

The kernel allocator is at klib/KernAllocator.h and klib/KernAllocator.C.

<KernAllocator.h*>=
<Read the literate code instead warning. >
#ifndef __OFF_KERN_ALLOCATOR_H
#define __OFF_KERN_ALLOCATOR_H 1

<Off basic kernel allocator dependencies. >

#ifdef __KERNEL__
<Off basic kernel allocator. >

#endif // __KERNEL__

#endif // __OFF_KERN_ALLOCATOR_H

<KernAllocator.C*>=
<Read the literate code instead warning. >

#include <klib/KernAllocator.h> // Exported interface.

<off_KernAllocator::operator+ and operator- implementation. >

Bitmap allocator code is at klib/BmAllocator.h and klib/BmAllocator.C.

<BmAllocator.h*>=
<Read the literate code instead warning. >
#ifndef __OFF_BM_ALLOCATOR_H
#define __OFF_BM_ALLOCATOR_H 1

<Off bitmap allocator dependencies. >
#ifdef __KERNEL__
<Off bitmap allocator. >
<Off type safe bitmap allocator. >
#endif // __KERNEL__

#endif // __OFF_BM_ALLOCATOR_H

<BmAllocator.C*>=
<Read the literate code instead warning. >

#include <klib/BmAllocator.h>   // Exported interface.

<off_BmAllocator::allocate and deallocate implementation. >

Software allocator code can be found in klib/SwAllocator.h and klib/SwAllocator.C.

<SwAllocator.h*>=
<Read the literate code instead warning. >
#ifndef __OFF_SW_ALLOCATOR_H
#define __OFF_SW_ALLOCATOR_H 1

<Off software allocator dependencies. >
#ifdef __KERNEL__
<Off software allocator. >
#endif // __KERNEL__

#endif // __OFF_SW_ALLOCATOR_H

<Off software allocator implementation dependencies. >

<SwAllocator.C*>=
<Read the literate code instead warning. >

#include <klib/SwAllocator.h>   // Exported interface.
<Off software allocator implementation dependencies. >

<off_SwAllocator::allocate implementation. >
<off_SwAllocator::deallocate implementation. >
<off_SwAllocator::freeze_state implementation. >
<off_SwAllocator::melt_state implementation. >

Fixed allocator code is contained in klib/FixedAllocator.h.

<FixedAllocator.h*>=
<Read the literate code instead warning. >
#ifndef __OFF_FIXED_ALLOCATOR_H
#define __OFF_FIXED_ALLOCATOR_H 1

<Off fixed allocator dependencies. >

#ifdef __KERNEL__
<Off fixed allocator. >
<Off type safe fixed allocator. >
#endif // __KERNEL__

#endif // __OFF_FIXED_ALLOCATOR_H

The sparse allocator can be found in klib/SparseAllocator.h and klib/SparseAllocator.C.

<SparseAllocator.h*>=
<Read the literate code instead warning. >
#ifndef __OFF_SPARSE_ALLOCATOR_H
#define __OFF_SPARSE_ALLOCATOR_H 1

<Off sparse allocator dependencies. >

#ifdef __KERNEL__
<Off sparse allocator. >
<Off type safe sparse allocator. >
#endif // __KERNEL__

#endif // __OFF_SPARSE_ALLOCATOR_H

<SparseAllocator.C*>=
<Read the literate code instead warning. >

#include <klib/SparseAllocator.h> // Exported interface.

<off_SparseAllocator::allocate implementation. >
<off_SparseAllocator::lookup implementation. >
<off_SparseAllocator::deallocate implementation. >
<off_SparseAllocator::operator+ implementation. >
<off_SparseAllocator::pos implementation. >

The block allocator stands at klib/BlockAllocator.h.

<BlockAllocator.h*>=
<Read the literate code instead warning. >
#ifndef __OFF_BLOCK_ALLOCATOR_H
#define __OFF_BLOCK_ALLOCATOR_H 1

<Off block allocator dependencies. >

#ifdef __KERNEL__
<Off block allocator. >
<Off type safe block allocator. >
#endif // __KERNEL__

#endif // __OFF_BLOCK_ALLOCATOR_H

<BlockAllocator.C*>=
<Read the literate code instead warning. >

#include <klib/BlockAllocator.h> // Exported interface.

<off_BlockAllocator::off_BlockAllocator implementation. >
<off_BlockAllocator::grow implementation. >



Francisco J. Ballesteros
1998-05-25