Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

EagerAcquisition.cpp File Reference

#include <iostream>
#include "Memory_Pool.h"

Classes

struct  My_Struct

Functions

void * operator new (std::size_t size, Memory_Pool &pool)
int main (int argc, char *argv[])

Variables

const std::size_t block_size = 1024
const std::size_t num_blocks = 32

Function Documentation

int main int  argc,
char *  argv[]
 

The main routine shows sample cases how the Memory_Pool can be used to optimize memory management.

void* operator new std::size_t  size,
Memory_Pool pool
 

A new operator is provided to allocate memory using an instance of Memory_Pool.

Parameters:
size 
pool 
Returns:
The allocated memory block.


Variable Documentation

const std::size_t block_size = 1024
 

const std::size_t num_blocks = 32
 

These pages document the source code of the patterns Lookup, Eager Acquisition, and Leasing.

Copyright 2004 John Wiley and Sons. All Rights Reserved.