Siena Fast Forwarding documentation (v. 1.0.0)

Main Page   Class Hierarchy   Compound List   File List   Compound Members   Examples  

FTAllocator Class Reference

#include <ft_allocator.h>

List of all members.

Public Methods

void * allocate (size_t s)
void clear ()
size_t size () const
 FTAllocator (size_t bs)

Private Attributes

const size_t BSize
blockblist
size_t free_pos
size_t bcount


Detailed Description

memory manager used by the forwarding table

This manager allocates and keeps track of blocks of memory. Individual segments of these blocks are then made available to users. The manager does not keep track of each individual segment. Rather it allows the user to deallocate all the memory at once. This memory manager is ideal for "dictionary" type data structures that allow only growing structure.


Member Function Documentation

void* FTAllocator::allocate size_t    s
 

allocates a memory segment of the given size *

void FTAllocator::clear  
 

deallocates all the memory blocks used by this allocator *

size_t FTAllocator::size   const
 

returns the total number of bytes used by this allocator *


Member Data Documentation

size_t FTAllocator::bcount [private]
 

number of blocks in use *

block* FTAllocator::blist [private]
 

pointer to the list of used blocks *

const size_t FTAllocator::BSize [private]
 

block size *

size_t FTAllocator::free_pos [private]
 

first available position within the current block *


The documentation for this class was generated from the following file:
Copyright © 2001-2002 University of Colorado.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This documentation is authored and maintained by Antonio Carzaniga