Subversion Repositories Code-Repo

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
141 Kevin 1
#ifndef __CONFIG_H_
2
#define __CONFIG_H_
3
 
4
/*
5
 * config.h - malloc lab configuration file
6
 *
7
 * Copyright (c) 2002, R. Bryant and D. O'Hallaron, All rights reserved.
8
 * May not be used, modified, or copied without permission.
9
 */
10
 
11
/*
12
 * This is the default path where the driver will look for the
13
 * default tracefiles. You can override it at runtime with the -t flag.
14
 */
15
#define TRACEDIR "/home/courses/cs3214/malloclab/traces/"
16
 
17
/*
18
 * This is the list of default tracefiles in TRACEDIR that the driver
19
 * will use for testing. Modify this if you want to add or delete
20
 * traces from the driver's test suite. For example, if you don't want
21
 * your students to implement realloc, you can delete the last two
22
 * traces.
23
 */
24
#define DEFAULT_TRACEFILES \
25
  "amptjp-bal.rep",\
26
  "cccp-bal.rep",\
27
  "cp-decl-bal.rep",\
28
  "expr-bal.rep",\
29
  "coalescing-bal.rep",\
30
  "random-bal.rep",\
31
  "random2-bal.rep",\
32
  "binary-bal.rep",\
33
  "binary2-bal.rep",\
34
  "realloc-bal.rep",\
35
  "realloc2-bal.rep"
36
 
37
/*
38
 * This constant gives the estimated performance of the libc malloc
39
 * package using our traces on some reference system, typically the
40
 * same kind of system the students use. Its purpose is to cap the
41
 * contribution of throughput to the performance index. Once the
42
 * students surpass the AVG_LIBC_THRUPUT, they get no further benefit
43
 * to their score.  This deters students from building extremely fast,
44
 * but extremely stupid malloc packages.
45
 *
46
 * gback@cs.vt.edu: I set this to a value that is achieved by a r/b 
47
 * tree-based implementation on our rlogin cluster as of Fall 2009; 
48
 * it's about twice the speed of the actual libc. 
49
 */
50
#define AVG_LIBC_THRUPUT      8.2E6  /* 8200 Kops/sec */
51
 
52
 /* 
53
  * This constant determines the contributions of space utilization
54
  * (UTIL_WEIGHT) and throughput (1 - UTIL_WEIGHT) to the performance
55
  * index.  
56
  */
57
#define UTIL_WEIGHT .60
58
 
59
/* 
60
 * Alignment requirement in bytes (either 4 or 8) 
61
 */
62
#define ALIGNMENT 8
63
 
64
/* 
65
 * Maximum heap size in bytes 
66
 */
67
#define MAX_HEAP (20*(1<<20))  /* 20 MB */
68
 
69
/*****************************************************************************
70
 * Set exactly one of these USE_xxx constants to "1" to select a timing method
71
 *****************************************************************************/
72
#define USE_FCYC   1   /* cycle counter w/K-best scheme (x86 & Alpha only) */
73
#define USE_ITIMER 0   /* interval timer (any Unix box) */
74
#define USE_GETTOD 0   /* gettimeofday (any Unix box) */
75
 
76
#endif /* __CONFIG_H */