Chapter1/large.c File Reference

Driver for testing allocation/deallocation mechanisms. Allocate REALLY large number of allocations and then time the cost to deallocate just one of these (the last one). More...

#include <stdio.h>
#include <sys/time.h>
#include <getopt.h>
#include <stdlib.h>
#include "report.h"

Functions

void generateTable (int chunk)
 Generate a table of memory of the given chunk size.
int main (int argc, char **argv)
 Run program with chunkSize as command line argument.

Variables

static struct timeval before
 Time before process starts.
static struct timeval after
 Time after process completes.
int n
 value for number of elements in a trial suite.
int lowN
 Low value for number of elements in trial suite.
int highN
 High value for number of elements in trial suite.


Detailed Description

Driver for testing allocation/deallocation mechanisms. Allocate REALLY large number of allocations and then time the cost to deallocate just one of these (the last one).

Author:
George Heineman
Date:
6/15/08

Function Documentation

void generateTable ( int  chunk  ) 

Generate a table of memory of the given chunk size.

Parameters:
chunk size of each allocated object.

int main ( int  argc,
char **  argv 
)

Run program with chunkSize as command line argument.


Variable Documentation

struct timeval after [static]

Time after process completes.

struct timeval before [static]

Time before process starts.

int highN

High value for number of elements in trial suite.

int lowN

Low value for number of elements in trial suite.

int n

value for number of elements in a trial suite.

Algorithm Development Kit 1.0