malloclab start

This commit is contained in:
2025-05-21 14:41:01 +08:00
parent 1b0b28f910
commit 4c3ef87f66
81 changed files with 1238155 additions and 0 deletions

26
malloclab/Makefile Normal file
View File

@ -0,0 +1,26 @@
# Copyright 2022 by mars
# Description: Makefile for building a malloc/free Simulator.
#
LDFLAGS +=
LDLIBS +=
CPPFLAGS := -O3 -Wall -Wextra -Winline -Winit-self -Wno-sequence-point\
-Wno-unused-function -Wno-inline -fPIC -W -Wcast-qual -Wpointer-arith -Wno-unused-parameter
#CPPFLAGS := -g
PROGRAMS := malloc
objects = clock.o fcyc.o fsecs.o mdriver.o memlib.o mm.o
all: $(PROGRAMS)
malloc : $(objects)
gcc $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
rm -f $(objects)
clean:
rm -f $(PROGRAMS) $(objects)

20
malloclab/Readme.txt Normal file
View File

@ -0,0 +1,20 @@
动态内存分配器实验
你需要修改mm.c你只能修改此文件其他文件不能修改使之能够处理内存分配mm_malloc、内存释放mm_free、内存扩张mm_realloc等功能。
你可以修改traces目录下的TRACE_LIST.txt以运行不同的trace。
你需要跑尽可能多的trace并在评分中拿到尽可能的高分。
【注意】并不是所有trace都可以跑的。有些trace内部包含了错误的操作是跑不通的。比如
1、试图realloc一个不存在的指针
2、试图free一个不存在的指针
Linux
1、make
2、./malloc -t traces
Windows:
1、用VS2019打开工程myMalloc/myMalloc.sln编译
2、生成可执行代码myMalloc -t traces
【提交】你需要将mm.c修改为mm_201900221122.c其中后面是你的学号。提交到educoder上。你只需要提交mm.c文件。

107
malloclab/clock.c Normal file
View File

@ -0,0 +1,107 @@
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#ifdef _WIN32
#include <windows.h>
#include <intrin.h>
#else
#include <unistd.h>
#endif
#include "clock.h"
void start_counter(void);
double get_counter(void);
/*
* Routines for using the cycle counter
*/
/* $begin x86cyclecounter */
/* Initialize the cycle counter */
static unsigned cyc_hi = 0;
static unsigned cyc_lo = 0;
/* Set *hi and *lo to the high and low order bits of the cycle counter.
Implementation requires assembly code to use the rdtsc instruction. */
void access_counter(unsigned* hi, unsigned* lo)
{
#ifdef _WIN32
long long counter;
counter = __rdtsc();
(*hi) = (unsigned int)(counter >> 32);
(*lo) = (unsigned int)counter;
#else
asm("rdtsc; movl %%edx,%0; movl %%eax,%1" /* Read cycle counter */
: "=r" (*hi), "=r" (*lo) /* and move results to */
: /* No input */ /* the two outputs */
: "%edx", "%eax");
#endif
}
/* Record the current value of the cycle counter. */
void start_counter(void)
{
access_counter(&cyc_hi, &cyc_lo);
}
/* Return the number of cycles since the last call to start_counter. */
double get_counter(void)
{
unsigned ncyc_hi, ncyc_lo;
unsigned hi, lo, borrow;
double result;
/* Get cycle counter */
access_counter(&ncyc_hi, &ncyc_lo);
/* Do double precision subtraction */
lo = ncyc_lo - cyc_lo;
borrow = lo > ncyc_lo;
hi = ncyc_hi - cyc_hi - borrow;
result = (double)hi * (1 << 30) * 4 + lo;
if (result < 0) {
printf("[%s]错误counter返回了负值%.0f\n", __func__, result);
}
return result;
}
void make_CPU_busy(void)
{
volatile double old_tick, new_tick;
start_counter();
old_tick = get_counter();
new_tick = get_counter();
while (new_tick - old_tick < 1000000000)
new_tick = get_counter();
}
/* $begin mhz */
/* Estimate the clock rate by measuring the cycles that elapse */
/* while sleeping for sleeptime seconds */
double mhz_full(int verbose, int sleeptime)
{
double rate;
if (verbose)
printf("[%s]准备开始测量处理器性能,睡眠时间=%d秒\n", __func__, sleeptime);
start_counter();
#ifdef _WIN32
Sleep(sleeptime * 1000);
#else
sleep(sleeptime);
#endif
rate = get_counter() / (1e6 * sleeptime);
if (verbose)
printf("[%s]处理器主频 ~= %.1f MHz\n", __func__, rate);
return rate;
}
/* $end mhz */
/* Version using a default sleeptime */
double mhz(int verbose)
{
return mhz_full(verbose, 2);
}

10
malloclab/clock.h Normal file
View File

@ -0,0 +1,10 @@
/* Routines for using cycle counter */
/* Start the counter */
void start_counter(void);
/* Get # cycles since counter started */
double get_counter(void);
double mhz(int verbose);
void make_CPU_busy(void);

71
malloclab/config.h Normal file
View File

@ -0,0 +1,71 @@
#ifndef __CONGIF_H_
#define __CONFIG_H_
/*
* config.h - malloc lab configuration file
*
* Copyright (c) 2002, R. Bryant and D. O'Hallaron, All rights reserved.
* May not be used, modified, or copied without permission.
*/
/*
* This is the default path where the driver will look for the
* default tracefiles. You can override it at runtime with the -t flag.
*/
#define TRACEDIR "./traces/"
/*
* This is the list of default tracefiles in TRACEDIR that the driver
* will use for testing. Modify this if you want to add or delete
* traces from the driver's test suite. For example, if you don't want
* your students to implement realloc, you can delete the last two
* traces.
*/
#define DEFAULT_TRACEFILES \
"amptjp-bal.rep",\
"cccp-bal.rep",\
"cp-decl-bal.rep",\
"expr-bal.rep",\
"coalescing-bal.rep",\
"random-bal.rep",\
"random2-bal.rep",\
"binary-bal.rep",\
"binary2-bal.rep"
/*
* This constant gives the estimated performance of the libc malloc
* package using our traces on some reference system, typically the
* same kind of system the students use. Its purpose is to cap the
* contribution of throughput to the performance index. Once the
* students surpass the AVG_LIBC_THRUPUT, they get no further benefit
* to their score. This deters students from building extremely fast,
* but extremely stupid malloc packages.
*/
#define AVG_LIBC_THRUPUT 500E3 /* 500 Kops/sec */
//#define AVG_LIBC_THRUPUT 53000000 /* 5300 Kops/sec */
/*
* This constant determines the contributions of space utilization
* (UTIL_WEIGHT) and throughput (1 - UTIL_WEIGHT) to the performance
* index.
*/
#define UTIL_WEIGHT .60
/*
* Alignment requirement in bytes (either 4 or 8)
*/
#define ALIGNMENT 8
/*
* Maximum heap size in bytes
*/
#define MAX_HEAP (20*(1<<20)) /* 20 MB */
/*****************************************************************************
* Set exactly one of these USE_xxx constants to "1" to select a timing method
*****************************************************************************/
#define USE_FCYC 1 /* cycle counter w/K-best scheme (x86 & Alpha only) */
#define USE_ITIMER 0 /* interval timer (any Unix box) */
#define USE_GETTOD 0 /* gettimeofday (any Unix box) */
#endif /* __CONFIG_H */

230
malloclab/fcyc.c Normal file
View File

@ -0,0 +1,230 @@
/*
* fcyc.c - Estimate the time (in CPU cycles) used by a function f
*
* Copyright (c) 2002, R. Bryant and D. O'Hallaron, All rights reserved.
* May not be used, modified, or copied without permission.
*
* Uses the cycle timer routines in clock.c to estimate the
* the time in CPU cycles for a function f.
*/
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include "fcyc.h"
#include "clock.h"
/* Default values */
#define K 3 /* Value of K in K-best scheme */
#define MAXSAMPLES 20 /* Give up after MAXSAMPLES */
#define EPSILON 0.01 /* K samples should be EPSILON of each other*/
#define CLEAR_CACHE 0 /* Clear cache before running test function */
#define CACHE_BYTES (1<<19) /* Max cache size in bytes */
#define CACHE_BLOCK 32 /* Cache block size in bytes */
static int kbest = K;
static int maxsamples = MAXSAMPLES;
static double epsilon = EPSILON;
static int clear_cache = CLEAR_CACHE;
static int cache_bytes = CACHE_BYTES;
static int cache_block = CACHE_BLOCK;
static int* cache_buf = NULL;
static double* values = NULL;
static int samplecount = 0;
/* for debugging only */
#define KEEP_VALS 0
#define KEEP_SAMPLES 0
#if KEEP_SAMPLES
static double* samples = NULL;
#endif
/*
* init_sampler - Start new sampling process
*/
static void init_sampler(void)
{
if (values)
free(values);
values = calloc(kbest, sizeof(double));
#if KEEP_SAMPLES
if (samples)
free(samples);
/* Allocate extra for wraparound analysis */
samples = calloc(maxsamples + kbest, sizeof(double));
#endif
samplecount = 0;
}
/*
* add_sample - Add new sample
*/
static void add_sample(double val)
{
int pos = 0;
if (samplecount < kbest) {
pos = samplecount;
values[pos] = val;
}
else if (val < values[kbest - 1]) {
pos = kbest - 1;
values[pos] = val;
}
#if KEEP_SAMPLES
samples[samplecount] = val;
#endif
samplecount++;
/* Insertion sort */
while (pos > 0 && values[pos - 1] > values[pos]) {
double temp = values[pos - 1];
values[pos - 1] = values[pos];
values[pos] = temp;
pos--;
}
}
/*
* has_converged- Have kbest minimum measurements converged within epsilon?
*/
static int has_converged(void)
{
return
(samplecount >= kbest) &&
((1 + epsilon) * values[0] >= values[kbest - 1]);
}
/*
* clear - Code to clear cache
*/
static volatile int sink = 0;
static void clear(void)
{
int x = sink;
int* cptr, * cend;
int incr = cache_block / sizeof(int);
if (!cache_buf) {
cache_buf = malloc(cache_bytes);
if (!cache_buf) {
printf("[%s]致命错误当试图清除cache时malloc返回null\n", __func__);
exit(1);
}
}
cptr = (int*)cache_buf;
cend = cptr + cache_bytes / sizeof(int);
while (cptr < cend) {
x += *cptr;
cptr += incr;
}
sink = x;
}
/*
* fcyc - Use K-best scheme to estimate the running time of function f
*/
double fcyc(test_funct f, void* argp)
{
double result;
init_sampler();
make_CPU_busy();
do {
double cyc;
if (clear_cache)
clear();
start_counter();
f(argp);
cyc = get_counter();
add_sample(cyc);
} while (!has_converged() && samplecount < maxsamples);
#ifdef DEBUG
{
int i;
printf(" %d smallest values: [", kbest);
for (i = 0; i < kbest; i++)
printf("%.0f%s", values[i], i == kbest - 1 ? "]\n" : ", ");
}
#endif
result = values[0];
#if !KEEP_VALS
free(values);
values = NULL;
#endif
return result;
}
/*************************************************************
* Set the various parameters used by the measurement routines
************************************************************/
/*
* set_fcyc_clear_cache - When set, will run code to clear cache
* before each measurement.
* Default = 0
*/
void set_fcyc_clear_cache(int clear)
{
clear_cache = clear;
}
/*
* set_fcyc_cache_size - Set size of cache to use when clearing cache
* Default = 1<<19 (512KB)
*/
void set_fcyc_cache_size(int bytes)
{
if (bytes != cache_bytes) {
cache_bytes = bytes;
if (cache_buf) {
free(cache_buf);
cache_buf = NULL;
}
}
}
/*
* set_fcyc_cache_block - Set size of cache block
* Default = 32
*/
void set_fcyc_cache_block(int bytes) {
cache_block = bytes;
}
/*
* set_fcyc_k - Value of K in K-best measurement scheme
* Default = 3
*/
void set_fcyc_k(int k)
{
kbest = k;
}
/*
* set_fcyc_maxsamples - Maximum number of samples attempting to find
* K-best within some tolerance.
* When exceeded, just return best sample found.
* Default = 20
*/
void set_fcyc_maxsamples(int maxsamples_arg)
{
maxsamples = maxsamples_arg;
}
/*
* set_fcyc_epsilon - Tolerance required for K-best
* Default = 0.01
*/
void set_fcyc_epsilon(double epsilon_arg)
{
epsilon = epsilon_arg;
}

68
malloclab/fcyc.h Normal file
View File

@ -0,0 +1,68 @@
/*
* fcyc.h - prototypes for the routines in fcyc.c that estimate the
* time in CPU cycles used by a test function f
*
* Copyright (c) 2002, R. Bryant and D. O'Hallaron, All rights reserved.
* May not be used, modified, or copied without permission.
*
*/
/* The test function takes a generic pointer as input */
typedef void (*test_funct)(void *);
/* Compute number of cycles used by test function f */
double fcyc(test_funct f, void* argp);
/*********************************************************
* Set the various parameters used by measurement routines
*********************************************************/
/*
* set_fcyc_clear_cache - When set, will run code to clear cache
* before each measurement.
* Default = 0
*/
void set_fcyc_clear_cache(int clear);
/*
* set_fcyc_cache_size - Set size of cache to use when clearing cache
* Default = 1<<19 (512KB)
*/
void set_fcyc_cache_size(int bytes);
/*
* set_fcyc_cache_block - Set size of cache block
* Default = 32
*/
void set_fcyc_cache_block(int bytes);
/*
* set_fcyc_compensate- When set, will attempt to compensate for
* timer interrupt overhead
* Default = 0
*/
void set_fcyc_compensate(int compensate_arg);
/*
* set_fcyc_k - Value of K in K-best measurement scheme
* Default = 3
*/
void set_fcyc_k(int k);
/*
* set_fcyc_maxsamples - Maximum number of samples attempting to find
* K-best within some tolerance.
* When exceeded, just return best sample found.
* Default = 20
*/
void set_fcyc_maxsamples(int maxsamples_arg);
/*
* set_fcyc_epsilon - Tolerance required for K-best
* Default = 0.01
*/
void set_fcyc_epsilon(double epsilon_arg);

43
malloclab/fsecs.c Normal file
View File

@ -0,0 +1,43 @@
/****************************
* High-level timing wrappers
****************************/
#include <stdio.h>
#include "fsecs.h"
#include "fcyc.h"
#include "clock.h"
//#include "ftimer.h"
#include "config.h"
static double Mhz; /* estimated CPU clock frequency */
extern int verbose; /* -v option in mdriver.c */
/*
* init_fsecs - initialize the timing package
*/
void init_fsecs(void)
{
Mhz = 0; /* keep gcc -Wall happy */
if (verbose)
printf("[%s]通过cycle计数器来测量性能.\n", __func__);
/* set key parameters for the fcyc package */
set_fcyc_maxsamples(200);
set_fcyc_clear_cache(1);
set_fcyc_epsilon(0.01);
set_fcyc_k(3);
Mhz = mhz(verbose > 0);
// printf("[%s]Your CPU is %fMhz\n",__func__, Mhz);
}
/*
* fsecs - Return the running time of a function f (in seconds)
*/
double fsecs(fsecs_test_funct f, void* argp)
{
double cycles = fcyc(f, argp);
return cycles / (Mhz * 1e6);
}

4
malloclab/fsecs.h Normal file
View File

@ -0,0 +1,4 @@
typedef void (*fsecs_test_funct)(void *);
void init_fsecs(void);
double fsecs(fsecs_test_funct f, void *argp);

250
malloclab/getopt.c Normal file
View File

@ -0,0 +1,250 @@
/*****************************************************************************
* getopt.c - competent and free getopt library.
* $Header: /cvsroot/freegetopt/freegetopt/getopt.c,v 1.2 2003/10/26 03:10:20 vindaci Exp $
*
* Copyright (c)2002-2003 Mark K. Kim
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* * Neither the original author of this software nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "getopt.h"
static const char* ID = "$Id: getopt.c,v 1.2 2003/10/26 03:10:20 vindaci Exp $";
char* optarg = NULL;
int optind = 0;
int opterr = 1;
int optopt = '?';
static char** prev_argv = NULL; /* Keep a copy of argv and argc to */
static int prev_argc = 0; /* tell if getopt params change */
static int argv_index = 0; /* Option we're checking */
static int argv_index2 = 0; /* Option argument we're checking */
static int opt_offset = 0; /* Index into compounded "-option" */
static int dashdash = 0; /* True if "--" option reached */
static int nonopt = 0; /* How many nonopts we've found */
static void increment_index()
{
/* Move onto the next option */
if (argv_index < argv_index2)
{
while (prev_argv[++argv_index] && prev_argv[argv_index][0] != '-'
&& argv_index < argv_index2 + 1);
}
else argv_index++;
opt_offset = 1;
}
/*
* Permutes argv[] so that the argument currently being processed is moved
* to the end.
*/
static int permute_argv_once()
{
/* Movability check */
if (argv_index + nonopt >= prev_argc) return 1;
/* Move the current option to the end, bring the others to front */
else
{
char* tmp = prev_argv[argv_index];
/* Move the data */
memmove(&prev_argv[argv_index], &prev_argv[argv_index + 1],
sizeof(char**) * (prev_argc - argv_index - 1));
prev_argv[prev_argc - 1] = tmp;
nonopt++;
return 0;
}
}
int getopt(int argc, char** argv, char* optstr)
{
int c = 0;
/* If we have new argv, reinitialize */
if (prev_argv != argv || prev_argc != argc)
{
/* Initialize variables */
prev_argv = argv;
prev_argc = argc;
argv_index = 1;
argv_index2 = 1;
opt_offset = 1;
dashdash = 0;
nonopt = 0;
}
/* Jump point in case we want to ignore the current argv_index */
getopt_top:
/* Misc. initializations */
optarg = NULL;
/* Dash-dash check */
if (argv[argv_index] && !strcmp(argv[argv_index], "--"))
{
dashdash = 1;
increment_index();
}
/* If we're at the end of argv, that's it. */
if (argv[argv_index] == NULL)
{
c = -1;
}
/* Are we looking at a string? Single dash is also a string */
else if (dashdash || argv[argv_index][0] != '-' || !strcmp(argv[argv_index], "-"))
{
/* If we want a string... */
if (optstr[0] == '-')
{
c = 1;
optarg = argv[argv_index];
increment_index();
}
/* If we really don't want it (we're in POSIX mode), we're done */
else if (optstr[0] == '+')// || getenv("POSIXLY_CORRECT"))
{
c = -1;
/* Everything else is a non-opt argument */
nonopt = argc - argv_index;
}
/* If we mildly don't want it, then move it back */
else
{
if (!permute_argv_once()) goto getopt_top;
else c = -1;
}
}
/* Otherwise we're looking at an option */
else
{
char* opt_ptr = NULL;
/* Grab the option */
c = argv[argv_index][opt_offset++];
/* Is the option in the optstr? */
if (optstr[0] == '-') opt_ptr = strchr(optstr + 1, c);
else opt_ptr = strchr(optstr, c);
/* Invalid argument */
if (!opt_ptr)
{
if (opterr)
{
fprintf(stderr, "%s: invalid option -- %c\n", argv[0], c);
}
optopt = c;
c = '?';
/* Move onto the next option */
increment_index();
}
/* Option takes argument */
else if (opt_ptr[1] == ':')
{
/* ie, -oARGUMENT, -xxxoARGUMENT, etc. */
if (argv[argv_index][opt_offset] != '\0')
{
optarg = &argv[argv_index][opt_offset];
increment_index();
}
/* ie, -o ARGUMENT (only if it's a required argument) */
else if (opt_ptr[2] != ':')
{
/* One of those "you're not expected to understand this" moment */
if (argv_index2 < argv_index) argv_index2 = argv_index;
while (argv[++argv_index2] && argv[argv_index2][0] == '-');
optarg = argv[argv_index2];
/* Don't cross into the non-option argument list */
if (argv_index2 + nonopt >= prev_argc) optarg = NULL;
/* Move onto the next option */
increment_index();
}
else
{
/* Move onto the next option */
increment_index();
}
/* In case we got no argument for an option with required argument */
if (optarg == NULL && opt_ptr[2] != ':')
{
optopt = c;
c = '?';
if (opterr)
{
fprintf(stderr, "%s: option requires an argument -- %c\n",
argv[0], optopt);
}
}
}
/* Option does not take argument */
else
{
/* Next argv_index */
if (argv[argv_index][opt_offset] == '\0')
{
increment_index();
}
}
}
/* Calculate optind */
if (c == -1)
{
optind = argc - nonopt;
}
else
{
optind = argv_index;
}
return c;
}
/* vim:ts=3
*/

63
malloclab/getopt.h Normal file
View File

@ -0,0 +1,63 @@
/*****************************************************************************
* getopt.h - competent and free getopt library.
* $Header: /cvsroot/freegetopt/freegetopt/getopt.h,v 1.2 2003/10/26 03:10:20 vindaci Exp $
*
* Copyright (c)2002-2003 Mark K. Kim
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* * Neither the original author of this software nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
#ifndef GETOPT_H_
#define GETOPT_H_
#ifdef __cplusplus
extern "C" {
#endif
extern char* optarg;
extern int optind;
extern int opterr;
extern int optopt;
int getopt(int argc, char** argv, char* optstr);
#ifdef __cplusplus
}
#endif
#endif /* GETOPT_H_ */
/* vim:ts=3
*/

1387
malloclab/mdriver.c Normal file

File diff suppressed because it is too large Load Diff

112
malloclab/memlib.c Normal file
View File

@ -0,0 +1,112 @@
/*
* memlib.c - a module that simulates the memory system. Needed because it
* allows us to interleave calls from the student's malloc package
* with the system's malloc package in libc.
*/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#ifndef _WIN32
#include <unistd.h>
#endif
#include <string.h>
#include <errno.h>
#include "memlib.h"
#include "config.h"
/* private variables */
static char* mem_start_brk; /* points to first byte of heap */
static char* mem_brk; /* points to last byte of heap */
static char* mem_max_addr; /* largest legal heap address */
#ifdef _WIN32
#include <windows.h>
int getpagesize(void)
{
SYSTEM_INFO system_info;
GetSystemInfo(&system_info);
return system_info.dwPageSize;
}
#endif
/*
* mem_init - initialize the memory system model
*/
void mem_init(void)
{
/* allocate the storage we will use to model the available VM */
if ((mem_start_brk = (char*)malloc(MAX_HEAP)) == NULL) {
printf("[%s]malloc失败\n", __func__);
exit(1);
}
mem_max_addr = mem_start_brk + MAX_HEAP; /* max legal heap address */
mem_brk = mem_start_brk; /* heap is empty initially */
}
/*
* mem_deinit - free the storage used by the memory system model
*/
void mem_deinit(void)
{
free(mem_start_brk);
}
/*
* mem_reset_brk - reset the simulated brk pointer to make an empty heap
*/
void mem_reset_brk()
{
mem_brk = mem_start_brk;
}
/*
* mem_sbrk - simple model of the sbrk function. Extends the heap
* by incr bytes and returns the start address of the new area. In
* this model, the heap cannot be shrunk.
*/
void* mem_sbrk(int incr)
{
char* old_brk = mem_brk;
if ((incr < 0) || ((mem_brk + incr) > mem_max_addr)) {
errno = ENOMEM;
printf("[%s]失败: 内存已被耗光...\n", __func__);
return (void*)-1;
}
mem_brk += incr;
return (void*)old_brk;
}
/*
* mem_heap_lo - return address of the first heap byte
*/
void* mem_heap_lo()
{
return (void*)mem_start_brk;
}
/*
* mem_heap_hi - return address of last heap byte
*/
void* mem_heap_hi()
{
return (void*)(mem_brk - 1);
}
/*
* mem_heapsize() - returns the heap size in bytes
*/
size_t mem_heapsize()
{
return (size_t)(mem_brk - mem_start_brk);
}
/*
* mem_pagesize() - returns the page size of the system
*/
size_t mem_pagesize()
{
return (size_t)getpagesize();
}

13
malloclab/memlib.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef _WIN32
#include <unistd.h>
#endif
void mem_init(void);
void mem_deinit(void);
void *mem_sbrk(int incr);
void mem_reset_brk(void);
void *mem_heap_lo(void);
void *mem_heap_hi(void);
size_t mem_heapsize(void);
size_t mem_pagesize(void);

148
malloclab/mm.c Normal file
View File

@ -0,0 +1,148 @@
/*
* mm-naive.c - 参考实现是一个最快的、最低效率的malloc.
*
* 在这个参考实现中分配一个块仅仅是增加brk指针
* 块内部全部是载荷数据块内没有header或者footer等
* 管理用的数据信息。分配出去的块,永远不释放或者回收。
* 重分配函数realloc的实现是直接通过mm_malloc和mm_free实现的
*
* 亲们请注意:你需要把此段注释,替换成你的算法设计思想。用描述性
* 的话来说清楚。
* 请将此文件重新命名为mm_201309060024.c就是mm_你的学号.c
*/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#ifndef _WIN32
#include <unistd.h>
#endif
#include <string.h>
#include "mm.h"
#include "memlib.h"
/*********************************************************
* 亲们请注意:开始之前,请把下面的信息修改为你的个人信息
********************************************************/
team_t team = {
/* 团队名字 */
"Tom is a Cat",
/* 团队老大的名字 */
"Tom",
/* 团队老大的email地址 */
"Tom@sina.com",
/* 团队其他成员的名字 (如果没有,就空着) */
"",
/* 团队其他成员的email地址 (如果没有,就空着) */
""
};
/* 单字 (4) 还是双字 (8) 边界对齐 */
#define ALIGNMENT 8
/* 舍入到最近的ALIGNMENT边界上 */
#define ALIGN(size) (((size) + (ALIGNMENT-1)) & ~0x7)
#define SIZE_T_SIZE (ALIGN(sizeof(size_t)))
static void print_block(int request_id, int payload);
/*
* mm_init - 初始化malloc系统此函数在整个运行期间只被调用1次用于建立初始化环境
*/
int mm_init(void)
{
return 0;
}
/*
* mm_malloc - 通过增加brk指针来分配一块内存。
* 总是分配一块内存它的大小是ALIGNMENT的整数倍对齐
*/
void* mm_malloc(size_t size)
{
// 将大小调整到ALIGNMENT的整数倍对齐
int newsize = ALIGN(size + SIZE_T_SIZE);
// 修改brk指针
void* p = mem_sbrk(newsize);
if (p == (void*)-1)
{
printf("[%s]mm_alloc失败size=%zu newsize=%d\n", __func__, size, newsize);
return NULL;
}
else {
*(size_t*)p = size;
return (void*)((char*)p + SIZE_T_SIZE);
}
}
/*
* mm_free - 释放一块内存。其实没干啥事....
*/
void mm_free(void* ptr)
{
}
/*
* mm_realloc - 重新扩展一块已分配的内存。仅仅是使用mm_malloc和mm_free来实现很蠢
*/
void* mm_realloc(void* ptr, size_t size)
{
void* oldptr = ptr;
void* newptr;
size_t copySize;
// 首先分配一块大一点的内存
newptr = mm_malloc(size);
if (newptr == NULL)
return NULL;
copySize = *(size_t*)((char*)oldptr - SIZE_T_SIZE);
if (size < copySize)
copySize = size;
// 把老内存里面的内容,复制到新内存里面
memcpy(newptr, oldptr, copySize);
// 释放掉老内存
mm_free(oldptr);
// 返回新内存的指针
return newptr;
}
/*
* mm_heapcheck - 目前暂不支持堆检查,可以不用修改
*/
void mm_heapcheck(void)
{
}
/*
* 输出一块数据 - 用于heapcheck然而在此并没有什么用可以不用修改
*/
static void print_block(int request_id, int payload)
{
printf("\n[%s]$BLOCK %d %d\n", __func__, request_id, payload);
}

23
malloclab/mm.h Normal file
View File

@ -0,0 +1,23 @@
#include <stdio.h>
extern int mm_init (void);
extern void *mm_malloc (size_t size);
extern void mm_free (void *ptr);
extern void *mm_realloc(void *ptr, size_t size);
extern void mm_heapcheck(void);
/*
* Students work in teams of one or two. Teams enter their team name,
* personal names and login IDs in a struct of this
* type in their bits.c file.
*/
typedef struct {
char *teamname; /* ID1+ID2 or ID1 */
char *name1; /* full name of first member */
char *id1; /* login ID of first member */
char *name2; /* full name of second member (if any) */
char *id2; /* login ID of second member */
} team_t;
extern team_t team;

View File

@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31829.152
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "myMalloc", "myMalloc.vcxproj", "{5C1ED0A5-23CE-4040-A263-C9C69E0BEAC7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5C1ED0A5-23CE-4040-A263-C9C69E0BEAC7}.Debug|x64.ActiveCfg = Debug|x64
{5C1ED0A5-23CE-4040-A263-C9C69E0BEAC7}.Debug|x64.Build.0 = Debug|x64
{5C1ED0A5-23CE-4040-A263-C9C69E0BEAC7}.Debug|x86.ActiveCfg = Debug|Win32
{5C1ED0A5-23CE-4040-A263-C9C69E0BEAC7}.Debug|x86.Build.0 = Debug|Win32
{5C1ED0A5-23CE-4040-A263-C9C69E0BEAC7}.Release|x64.ActiveCfg = Release|x64
{5C1ED0A5-23CE-4040-A263-C9C69E0BEAC7}.Release|x64.Build.0 = Release|x64
{5C1ED0A5-23CE-4040-A263-C9C69E0BEAC7}.Release|x86.ActiveCfg = Release|Win32
{5C1ED0A5-23CE-4040-A263-C9C69E0BEAC7}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {975E549F-4459-4716-891C-6BF59727C24E}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{5c1ed0a5-23ce-4040-a263-c9c69e0beac7}</ProjectGuid>
<RootNamespace>myMalloc</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CRT_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\clock.c" />
<ClCompile Include="..\fcyc.c" />
<ClCompile Include="..\fsecs.c" />
<ClCompile Include="..\getopt.c" />
<ClCompile Include="..\mdriver.c" />
<ClCompile Include="..\memlib.c" />
<ClCompile Include="..\mm.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,4 @@
seglist.rep
short1.rep
random2.rep
xterm.rep

100005
malloclab/traces/alaska.rep Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

4809
malloclab/traces/amptjp.rep Normal file

File diff suppressed because it is too large Load Diff

4166
malloclab/traces/bash.rep Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

4004
malloclab/traces/binary.rep Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

4804
malloclab/traces/binary2.rep Normal file

File diff suppressed because it is too large Load Diff

57721
malloclab/traces/boat.rep Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

5036
malloclab/traces/cccp.rep Normal file

File diff suppressed because it is too large Load Diff

11995
malloclab/traces/chrome.rep Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,19 @@
0
11
15
0
f -1
a 1 1
a 2 2
a 3 3
a 4 4
a 5 52428800
r 6 10
a 7 100
r 7 200
a 8 100
r 8 50
a 9 100
r 9 100
a 10 100
r 10 0

File diff suppressed because it is too large Load Diff

5687
malloclab/traces/cp-decl.rep Normal file

File diff suppressed because it is too large Load Diff

200404
malloclab/traces/exhaust.rep Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

4541
malloclab/traces/expr.rep Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

8004
malloclab/traces/firefox.rep Normal file

File diff suppressed because it is too large Load Diff

55096
malloclab/traces/freeciv.rep Normal file

File diff suppressed because it is too large Load Diff

424
malloclab/traces/fs.rep Normal file
View File

@ -0,0 +1,424 @@
1
418
420
0
a 0 1320
a 1 15
a 2 39
a 3 6
a 4 18
a 5 1320
a 6 3
a 7 1320
a 8 15
a 9 39
a 10 6
a 11 18
a 12 9
a 13 26
a 14 1320
a 15 3
a 16 1320
a 17 15
a 18 17
a 19 6
a 20 18
a 21 9
a 22 27
a 23 11
a 24 26
a 25 6
a 26 22
a 27 7
a 28 17
a 29 1320
a 30 3
a 31 1320
a 32 15
a 33 17
a 34 6
a 35 18
a 36 6
a 37 21
a 38 9
a 39 15
a 40 11
a 41 11
a 42 1320
a 43 3
a 44 1320
a 45 7
a 46 24
a 47 6
a 48 18
a 49 5
a 50 10
a 51 5
a 52 20
a 53 7
a 54 18
a 55 10
a 56 25
a 57 4
a 58 33
a 59 4
a 60 28
a 61 1320
a 62 3
a 63 1320
a 64 8
a 65 25
a 66 6
a 67 18
a 68 6
a 69 14
a 70 4
a 71 22
a 72 4
a 73 17
a 74 1320
a 75 3
a 76 1320
a 77 9
a 78 29
a 79 6
a 80 18
a 81 6
a 82 14
a 83 1320
a 84 8
a 85 25
a 86 6
a 87 18
a 88 9
a 89 31
a 90 7
a 91 36
a 92 7
a 93 29
a 94 4
a 95 22
a 96 4
a 97 17
a 98 1320
a 99 3
a 100 1320
a 101 6
a 102 22
a 103 6
a 104 18
a 105 6
a 106 14
a 107 1320
a 108 11
a 109 31
a 110 6
a 111 18
a 112 6
a 113 14
a 114 1320
a 115 7
a 116 18
a 117 6
a 118 18
a 119 6
a 120 14
a 121 5
a 122 29
a 123 12
a 124 16
a 125 1320
a 126 3
a 127 1320
a 128 9
a 129 31
a 130 6
a 131 18
a 132 6
a 133 24
a 134 1320
a 135 8
a 136 22
a 137 6
a 138 18
a 139 6
a 140 14
a 141 1320
a 142 3
a 143 1320
a 144 8
a 145 1320
a 146 10
a 147 18
a 148 6
a 149 18
a 150 6
a 151 14
a 152 1320
a 153 3
a 154 1320
a 155 9
a 156 29
a 157 6
a 158 18
a 159 6
a 160 14
a 161 1320
a 162 3
a 163 1320
a 164 6
a 165 24
a 166 6
a 167 18
a 168 6
a 169 14
a 170 1320
a 171 8
a 172 17
a 173 6
a 174 18
a 175 5
a 176 10
a 177 1320
a 178 8
a 179 17
a 180 6
a 181 18
a 182 5
a 183 10
a 184 5
a 185 12
a 186 6
a 187 10
a 188 4
a 189 17
a 190 6
a 191 27
a 192 1320
a 193 8
a 194 19
a 195 6
a 196 18
a 197 5
a 198 10
a 199 1320
a 200 13
a 201 27
a 202 6
a 203 18
a 204 6
a 205 14
a 206 5
a 207 16
a 208 6
a 209 23
a 210 10
a 211 23
a 212 1320
a 213 13
a 214 29
a 215 6
a 216 18
a 217 1320
a 218 13
a 219 1320
a 220 13
a 221 15
a 222 6
a 223 18
a 224 8
a 225 36
a 226 1320
a 227 10
a 228 7
a 229 30
a 230 1320
a 231 14
a 232 21
a 233 6
a 234 18
a 235 1320
a 236 10
a 237 22
a 238 6
a 239 18
a 240 9
a 241 15
a 242 1320
a 243 12
a 244 29
a 245 6
a 246 18
a 247 1320
a 248 9
a 249 17
a 250 6
a 251 18
a 252 6
a 253 14
a 254 5
a 255 20
a 256 1320
a 257 3
a 258 1320
a 259 8
a 260 19
a 261 6
a 262 18
a 263 6
a 264 10
a 265 9
a 266 16
a 267 12
a 268 17
a 269 1320
a 270 9
a 271 25
a 272 6
a 273 18
a 274 7
a 275 11
a 276 6
a 277 18
a 278 1320
a 279 10
a 280 17
a 281 6
a 282 18
a 283 6
a 284 14
a 285 1320
a 286 8
a 287 21
a 288 6
a 289 18
a 290 6
a 291 14
a 292 1320
a 293 7
a 294 24
a 295 6
a 296 18
a 297 1320
a 298 8
a 299 6
a 300 18
a 301 8
a 302 19
a 303 1320
a 304 8
a 305 1320
a 306 14
a 307 16
a 308 6
a 309 18
a 310 6
a 311 10
a 312 1320
a 313 8
a 314 16
a 315 6
a 316 18
a 317 6
a 318 10
a 319 6
a 320 22
a 321 8
a 322 25
a 323 1320
a 324 12
a 325 25
a 326 6
a 327 18
a 328 6
a 329 14
a 330 1320
a 331 8
a 332 34
a 333 6
a 334 18
a 335 8
a 336 12
a 337 1320
a 338 10
a 339 34
a 340 6
a 341 18
a 342 6
a 343 14
a 344 7
a 345 33
a 346 9
a 347 41
a 348 10
a 349 42
a 350 11
a 351 51
a 352 1320
a 353 12
a 354 33
a 355 6
a 356 18
a 357 8
a 358 31
a 359 7
a 360 19
a 361 10
a 362 17
a 363 9
a 364 12
a 365 1320
a 366 3
a 367 1320
a 368 9
a 369 34
a 370 6
a 371 18
a 372 7
a 373 10
a 374 1320
a 375 9
a 376 34
a 377 6
a 378 18
a 379 1320
a 380 11
a 381 33
a 382 6
a 383 18
a 384 8
a 385 16
a 386 9
a 387 17
a 388 7
a 389 15
a 390 1320
a 391 11
a 392 30
a 393 6
a 394 18
a 395 8
a 396 16
a 397 9
a 398 17
a 399 7
a 400 15
a 401 1320
a 402 5
a 403 21
a 404 6
a 405 18
a 406 7
a 407 12
a 408 7
a 409 1320
a 410 8
a 411 20
a 412 6
a 413 18
a 414 7
a 415 12
a 416 364
f 416
a 417 364
f 417

View File

@ -0,0 +1,122 @@
0
103
118
0
r 0 16
a 1 364
r 2 800
r 3 1024
r 3 2048
f 1
a 4 40
f 4
a 5 40
a 6 32
a 7 37
a 8 28
a 9 92
a 10 6
a 11 6
a 12 37
f 12
a 13 37
a 14 32
a 15 34
a 16 28
a 17 36
a 18 6
a 19 6
a 20 35
f 20
a 21 35
a 22 32
a 23 32
a 24 28
a 25 48
a 26 6
a 27 6
a 28 33
f 28
a 29 33
a 30 32
a 31 30
a 32 28
a 33 80
a 34 6
a 35 6
a 36 30
f 36
a 37 30
a 38 32
a 39 27
a 40 28
a 41 56
a 42 6
a 43 6
a 44 31
f 44
a 45 31
a 46 32
a 47 28
a 48 28
a 49 40
a 50 6
a 51 6
a 52 34
f 52
a 53 34
a 54 32
a 55 31
a 56 28
a 57 48
a 58 6
a 59 6
a 60 34
f 60
a 61 34
a 62 32
a 63 31
a 64 28
a 65 212
a 66 6
a 67 6
a 68 33
f 68
a 69 33
a 70 32
a 71 30
a 72 28
a 73 104
a 74 6
a 75 6
a 76 30
f 76
a 77 30
a 78 32
a 79 27
a 80 28
a 81 472
a 82 6
a 83 6
a 84 33
f 84
a 85 33
a 86 32
a 87 30
a 88 28
a 89 52
a 90 6
a 91 6
a 92 31
f 92
a 93 31
a 94 32
a 95 28
a 96 28
a 97 380
a 98 6
a 99 6
a 100 6
f 0
a 101 22
a 102 10

19409
malloclab/traces/login.rep Normal file

File diff suppressed because it is too large Load Diff

205
malloclab/traces/lrucd.rep Normal file
View File

@ -0,0 +1,205 @@
1
40
200
0
a 39 512
a 13 136
a 35 8
a 9 8
a 2 8
a 38 8
a 33 8
a 32 136
a 21 54
a 11 136
a 36 136
a 4 512
a 10 512
f 9
a 29 54
a 28 136
f 29
a 1 8
f 4
a 4 8
a 20 136
f 11
a 11 54
a 16 512
f 38
a 25 512
a 8 512
f 20
a 0 512
f 32
f 16
f 33
a 18 54
a 34 54
f 35
f 0
f 21
f 10
a 3 8
a 17 8
a 20 136
a 0 136
a 9 8
a 14 512
f 18
a 33 54
f 20
a 35 512
a 7 512
f 14
f 13
f 35
a 24 136
a 12 54
f 1
a 16 512
f 28
f 36
a 38 136
f 38
a 36 54
f 33
a 32 512
f 11
a 22 54
f 17
a 28 512
f 28
a 17 8
f 36
a 27 136
a 21 54
a 15 136
f 34
a 26 512
f 9
a 30 54
f 17
a 1 136
a 23 512
f 26
a 5 512
f 4
a 20 136
f 1
a 36 136
f 21
f 25
f 24
a 25 8
f 27
f 32
f 30
a 24 512
f 20
a 19 136
a 14 8
f 25
a 18 54
a 28 8
a 37 8
a 4 54
f 14
f 24
f 3
a 32 136
f 22
a 13 8
f 12
a 26 136
a 3 54
f 15
a 11 8
a 25 8
a 31 8
f 2
a 14 512
f 23
a 1 8
f 7
a 15 512
a 22 54
f 14
f 32
f 26
a 26 512
f 19
f 39
a 19 136
f 36
a 12 54
f 37
a 27 136
a 17 136
f 11
f 19
a 36 54
f 8
f 4
f 25
a 29 136
a 9 8
f 17
a 2 8
a 25 8
a 14 54
a 33 136
a 21 512
a 20 136
a 17 54
f 21
f 3
a 11 512
a 30 54
f 27
f 25
f 28
f 5
a 5 512
a 23 8
a 38 8
a 19 136
a 39 512
f 11
a 32 512
a 28 136
f 2
a 11 136
f 11
a 11 512
f 39
f 38
f 20
f 29
a 4 136
f 5
f 28
f 9
a 10 8
f 0
f 26
a 0 512
a 39 136
f 10
a 35 136
f 15
a 15 8
a 6 136
f 17
a 29 512
f 13
f 4
a 37 54
f 32
f 14
f 23
f 15
a 10 54
a 26 8
f 22
a 23 512

159
malloclab/traces/ls.1.rep Normal file
View File

@ -0,0 +1,159 @@
1
134
155
0
r 0 16
a 1 364
r 2 800
r 3 1024
r 3 2048
f 1
a 4 40
f 4
a 5 40
a 6 32
a 7 37
a 8 28
a 9 92
a 10 6
a 11 6
a 12 37
f 12
a 13 37
a 14 32
a 15 34
a 16 28
a 17 36
a 18 6
a 19 6
a 20 35
f 20
a 21 35
a 22 32
a 23 32
a 24 28
a 25 48
a 26 6
a 27 6
a 28 33
f 28
a 29 33
a 30 32
a 31 30
a 32 28
a 33 80
a 34 6
a 35 6
a 36 30
f 36
a 37 30
a 38 32
a 39 27
a 40 28
a 41 56
a 42 6
a 43 6
a 44 31
f 44
a 45 31
a 46 32
a 47 28
a 48 28
a 49 40
a 50 6
a 51 6
a 52 34
f 52
a 53 34
a 54 32
a 55 31
a 56 28
a 57 48
a 58 6
a 59 6
a 60 34
f 60
a 61 34
a 62 32
a 63 31
a 64 28
a 65 212
a 66 6
a 67 6
a 68 33
f 68
a 69 33
a 70 32
a 71 30
a 72 28
a 73 104
a 74 6
a 75 6
a 76 30
f 76
a 77 30
a 78 32
a 79 27
a 80 28
a 81 472
a 82 6
a 83 6
a 84 33
f 84
a 85 33
a 86 32
a 87 30
a 88 28
a 89 52
a 90 6
a 91 6
a 92 31
f 92
a 93 31
a 94 32
a 95 28
a 96 28
a 97 380
a 98 6
a 99 6
a 100 6
f 0
a 101 22
a 102 10
a 103 36
a 104 36
a 105 11600
a 106 12
a 107 2
a 108 4144
a 109 27
a 110 19
a 111 14
a 112 14
a 113 16
a 114 62
a 115 19
a 116 16
a 117 26
a 118 20
a 119 24
a 120 28
a 121 22
a 122 26
a 123 28
a 124 22
a 125 26
a 126 28
a 127 22
a 128 26
a 129 16
f 108
a 130 364
f 130
a 131 6
a 132 364
f 132
a 133 2436
f 133
f 107
f 106

376
malloclab/traces/ls.rep Normal file
View File

@ -0,0 +1,376 @@
0
264
372
0
r 0 16
a 1 364
r 2 800
r 3 1024
r 3 2048
f 1
a 4 40
f 4
a 5 40
a 6 32
a 7 37
a 8 28
a 9 92
a 10 6
a 11 6
a 12 37
f 12
a 13 37
a 14 32
a 15 34
a 16 28
a 17 36
a 18 6
a 19 6
a 20 35
f 20
a 21 35
a 22 32
a 23 32
a 24 28
a 25 48
a 26 6
a 27 6
a 28 33
f 28
a 29 33
a 30 32
a 31 30
a 32 28
a 33 80
a 34 6
a 35 6
a 36 30
f 36
a 37 30
a 38 32
a 39 27
a 40 28
a 41 56
a 42 6
a 43 6
a 44 31
f 44
a 45 31
a 46 32
a 47 28
a 48 28
a 49 40
a 50 6
a 51 6
a 52 34
f 52
a 53 34
a 54 32
a 55 31
a 56 28
a 57 48
a 58 6
a 59 6
a 60 34
f 60
a 61 34
a 62 32
a 63 31
a 64 28
a 65 212
a 66 6
a 67 6
a 68 33
f 68
a 69 33
a 70 32
a 71 30
a 72 28
a 73 104
a 74 6
a 75 6
a 76 30
f 76
a 77 30
a 78 32
a 79 27
a 80 28
a 81 472
a 82 6
a 83 6
a 84 33
f 84
a 85 33
a 86 32
a 87 30
a 88 28
a 89 52
a 90 6
a 91 6
a 92 31
f 92
a 93 31
a 94 32
a 95 28
a 96 28
a 97 380
a 98 6
a 99 6
a 100 6
f 0
a 101 22
a 102 10
a 103 364
a 104 46
a 105 13
a 106 94
a 107 16
a 108 15
a 109 14
a 110 840
a 111 10
a 112 10
a 113 10
a 114 10
a 115 10
a 116 13
a 117 12
a 118 13
a 119 17
a 120 17
a 121 17
a 122 17
a 123 17
a 124 15
a 125 15
a 126 15
a 127 15
a 128 15
a 129 17
a 130 17
a 131 17
a 132 13
a 133 15
a 134 13
a 135 13
a 136 15
a 137 15
a 138 15
a 139 20
a 140 22
a 141 13
a 142 22
a 143 16
a 144 15
a 145 15
a 146 13
a 147 17
a 148 16
a 149 15
a 150 16
a 151 32
a 152 15
a 153 15
a 154 15
a 155 15
a 156 17
a 157 17
a 158 17
a 159 17
a 160 17
a 161 16
a 162 16
a 163 16
a 164 15
a 165 20
a 166 16
a 167 15
a 168 15
a 169 20
a 170 15
a 171 13
a 172 16
a 173 16
a 174 19
a 175 16
a 176 15
a 177 14
a 178 14
a 179 17
a 180 13
a 181 16
a 182 14
a 183 14
a 184 13
a 185 29
a 186 29
a 187 17
a 188 15
a 189 16
a 190 23
a 191 18
a 192 18
a 193 18
f 103
f 105
f 109
a 194 13
f 118
a 195 13
f 116
a 196 772
f 107
f 108
f 111
f 112
f 113
f 114
f 115
f 195
f 117
f 194
f 119
f 120
f 121
f 122
f 123
f 124
f 125
f 126
f 127
f 128
f 129
f 130
f 131
f 132
f 133
f 134
f 135
f 136
f 137
f 138
f 139
f 140
f 141
f 142
f 143
f 144
f 145
f 146
f 147
f 148
f 149
f 150
f 151
f 152
f 153
f 154
f 155
f 156
f 157
f 158
f 159
f 160
f 161
f 162
f 163
f 164
f 165
f 166
f 167
f 168
f 169
f 170
f 171
f 172
f 173
f 174
f 175
f 176
f 177
f 178
f 179
f 180
f 181
f 182
f 183
f 184
f 185
f 186
f 187
f 188
f 189
f 190
f 191
f 192
f 193
a 197 6
a 198 36
a 199 36
a 200 441
a 201 20
a 202 20
a 203 20
a 204 20
a 205 20
a 206 20
a 207 20
a 208 20
a 209 20
a 210 20
a 211 20
a 212 20
a 213 20
a 214 20
a 215 20
a 216 20
a 217 20
a 218 20
a 219 20
a 220 20
a 221 20
a 222 20
a 223 20
a 224 20
a 225 20
a 226 20
a 227 20
a 228 20
a 229 11600
a 230 12
a 231 2
a 232 4144
a 233 20
a 234 5
a 235 19
a 236 14
f 232
a 237 312
a 238 4
a 239 8
a 240 12
a 241 16
a 242 20
a 243 24
a 244 28
a 245 32
a 246 36
a 247 40
a 248 44
a 249 48
a 250 52
a 251 56
a 252 60
a 253 64
a 254 68
a 255 72
a 256 76
a 257 80
a 258 84
a 259 88
a 260 92
a 261 96
a 262 100
a 263 104
f 231
f 230

View File

@ -0,0 +1,21 @@
0
9
17
0
a 0 32
f 0
a 1 32
a 2 32
a 3 64
f 1
f 2
f 3
a 4 128
a 5 1024
f 4
a 6 32
a 7 33
f 6
a 8 34
f 8
f 5

View File

@ -0,0 +1,14 @@
0
10
10
0
a 0 32
a 1 32
a 2 32
a 3 64
a 4 128
a 5 1024
a 6 32
a 7 18
a 8 19
a 9 21

File diff suppressed because it is too large Load Diff

32787
malloclab/traces/mutt.rep Normal file

File diff suppressed because it is too large Load Diff

301354
malloclab/traces/needle.rep Normal file

File diff suppressed because it is too large Load Diff

205
malloclab/traces/nlydf.rep Normal file
View File

@ -0,0 +1,205 @@
1
60
200
0
a 59 512
a 57 16
a 15 1040
a 8 512
a 41 16
a 40 16
a 34 16
a 22 512
a 11 512
a 49 16
a 50 16
a 10 512
a 18 512
a 21 512
a 4 512
f 21
a 33 512
a 30 512
a 17 16
a 16 512
a 44 16
f 16
a 26 1040
a 24 16
f 11
a 54 1040
a 9 16
f 4
a 42 1040
f 30
a 47 1040
a 12 512
a 36 512
a 38 16
a 25 512
a 3 512
a 27 16
f 36
a 29 512
a 11 1040
a 13 1040
a 7 512
a 0 16
a 28 512
f 54
f 9
a 48 512
f 10
f 17
f 0
a 35 16
a 5 512
f 42
f 50
a 54 1040
a 58 1040
f 29
f 8
a 46 512
a 29 1040
a 1 1040
a 20 16
a 17 1040
f 26
f 27
f 34
f 7
f 18
a 37 512
f 3
f 12
f 59
a 7 1040
a 43 1040
a 27 1040
f 40
f 41
f 38
a 30 512
f 17
f 13
f 58
f 37
a 21 512
f 49
a 17 1040
f 46
f 15
a 34 512
a 58 1040
a 50 512
a 31 512
f 48
a 55 512
f 5
f 24
a 32 512
a 40 512
a 46 512
a 48 1040
f 50
f 54
a 18 16
a 19 16
a 42 512
f 55
f 21
a 3 16
f 44
a 4 16
a 10 1040
a 14 16
f 11
a 39 1040
a 54 1040
a 12 512
a 53 16
a 55 1040
f 39
a 37 512
a 26 1040
f 25
f 54
f 47
f 34
a 49 1040
a 36 512
f 18
f 57
f 20
a 2 512
f 28
f 46
f 35
f 4
a 59 1040
a 45 512
a 50 16
a 28 16
f 28
a 23 512
a 21 16
f 37
f 48
f 1
f 45
f 23
f 7
f 10
a 18 512
f 21
a 21 16
a 6 1040
f 40
a 9 1040
a 41 1040
f 2
a 35 1040
f 17
a 25 512
a 51 16
a 20 1040
f 53
a 24 1040
a 11 1040
f 29
f 50
f 9
f 55
a 34 16
a 29 1040
f 36
f 6
a 56 16
f 20
f 21
a 8 512
a 48 16
a 2 512
a 55 1040
a 7 1040
f 48
a 6 1040
f 3
a 57 16
f 19
f 35
a 4 512
a 54 1040
f 8
a 9 1040
f 58
a 53 1040
a 15 512
f 56
f 2
f 14
f 34
f 11
a 17 16
a 2 512

1479
malloclab/traces/perl.1.rep Normal file

File diff suppressed because it is too large Load Diff

1481
malloclab/traces/perl.2.rep Normal file

File diff suppressed because it is too large Load Diff

1452
malloclab/traces/perl.3.rep Normal file

File diff suppressed because it is too large Load Diff

1498
malloclab/traces/perl.rep Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

205
malloclab/traces/qyqyc.rep Normal file
View File

@ -0,0 +1,205 @@
1
40
200
0
a 39 512
a 36 512
a 9 8
a 7 512
a 29 54
f 39
a 20 512
a 1 8
a 39 54
a 22 512
a 14 512
a 37 112
a 11 112
f 11
a 8 112
a 6 54
f 39
a 19 112
a 26 512
a 0 54
a 15 8
a 30 512
a 12 54
a 31 112
a 32 8
a 17 8
f 7
f 36
f 19
a 13 512
f 14
a 14 54
a 10 112
a 25 112
a 19 8
a 2 512
f 13
a 7 8
a 16 112
f 32
f 6
a 32 512
f 8
a 13 8
a 27 54
f 29
a 18 54
a 8 512
a 28 8
a 6 112
a 33 512
f 16
f 6
a 11 8
a 23 112
f 1
a 21 54
f 31
f 22
f 37
f 17
a 16 112
a 6 512
a 31 512
f 27
f 13
f 8
f 32
f 11
f 12
a 37 112
a 22 8
f 25
f 21
a 1 8
a 5 8
f 37
f 30
a 12 512
f 12
f 33
a 36 8
a 11 54
a 21 8
f 21
f 26
a 13 512
a 38 54
a 24 112
a 27 512
a 37 512
f 20
f 23
f 6
a 26 54
a 29 8
f 9
f 36
f 19
f 24
a 6 512
a 9 512
a 33 54
a 21 512
f 6
f 22
a 22 8
a 32 512
a 8 112
a 17 112
a 3 512
a 12 54
a 4 512
f 27
f 7
f 18
f 0
f 38
a 38 512
a 30 512
a 6 8
a 23 512
a 39 8
f 2
a 35 8
f 6
a 6 54
f 4
f 11
f 28
f 33
f 14
f 16
a 4 512
f 29
a 16 112
f 16
f 23
a 11 512
a 24 512
f 17
a 23 54
a 14 54
a 2 8
f 2
a 16 54
f 15
a 33 8
a 17 112
a 7 8
f 22
a 27 112
a 22 54
f 27
a 29 54
f 23
f 26
f 37
a 20 54
a 2 8
f 1
f 2
a 28 8
a 26 54
f 39
f 10
f 12
a 18 512
f 4
f 35
f 18
f 21
f 31
f 11
f 22
f 6
f 29
a 10 54
f 26
f 33
a 19 8
a 25 512
f 13
a 34 54
a 4 54
f 5
a 39 512
a 11 54
f 20
f 19
a 35 112
a 31 112
a 12 54
a 6 8
f 9
f 25
a 5 8
f 12
f 17
f 5
f 38

File diff suppressed because it is too large Load Diff

4804
malloclab/traces/random.rep Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

4804
malloclab/traces/random2.rep Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

14405
malloclab/traces/realloc.rep Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

14405
malloclab/traces/realloc2.rep Normal file

File diff suppressed because it is too large Load Diff

147
malloclab/traces/rm.1.rep Normal file
View File

@ -0,0 +1,147 @@
1
116
143
0
r 0 16
a 1 364
r 2 800
r 3 1024
r 3 2048
f 1
a 4 40
f 4
a 5 40
a 6 32
a 7 37
a 8 28
a 9 92
a 10 6
a 11 6
a 12 37
f 12
a 13 37
a 14 32
a 15 34
a 16 28
a 17 36
a 18 6
a 19 6
a 20 35
f 20
a 21 35
a 22 32
a 23 32
a 24 28
a 25 48
a 26 6
a 27 6
a 28 33
f 28
a 29 33
a 30 32
a 31 30
a 32 28
a 33 80
a 34 6
a 35 6
a 36 30
f 36
a 37 30
a 38 32
a 39 27
a 40 28
a 41 56
a 42 6
a 43 6
a 44 31
f 44
a 45 31
a 46 32
a 47 28
a 48 28
a 49 40
a 50 6
a 51 6
a 52 34
f 52
a 53 34
a 54 32
a 55 31
a 56 28
a 57 48
a 58 6
a 59 6
a 60 34
f 60
a 61 34
a 62 32
a 63 31
a 64 28
a 65 212
a 66 6
a 67 6
a 68 33
f 68
a 69 33
a 70 32
a 71 30
a 72 28
a 73 104
a 74 6
a 75 6
a 76 30
f 76
a 77 30
a 78 32
a 79 27
a 80 28
a 81 472
a 82 6
a 83 6
a 84 33
f 84
a 85 33
a 86 32
a 87 30
a 88 28
a 89 52
a 90 6
a 91 6
a 92 31
f 92
a 93 31
a 94 32
a 95 28
a 96 28
a 97 380
a 98 6
a 99 6
a 100 6
f 0
a 101 22
a 102 10
a 103 4072
a 104 4072
a 105 40
a 106 536
a 107 20
a 108 4072
a 109 4144
a 110 20
f 109
a 111 4144
f 111
f 110
a 112 4144
a 113 20
f 112
a 114 4144
f 114
f 113
a 115 4144
f 115
f 107
f 106
f 105
f 103
f 104

151
malloclab/traces/rm.rep Normal file
View File

@ -0,0 +1,151 @@
1
121
147
0
r 0 16
a 1 364
r 2 800
r 3 1024
r 3 2048
f 1
a 4 40
f 4
a 5 40
a 6 32
a 7 37
a 8 28
a 9 92
a 10 6
a 11 6
a 12 37
f 12
a 13 37
a 14 32
a 15 34
a 16 28
a 17 36
a 18 6
a 19 6
a 20 35
f 20
a 21 35
a 22 32
a 23 32
a 24 28
a 25 48
a 26 6
a 27 6
a 28 33
f 28
a 29 33
a 30 32
a 31 30
a 32 28
a 33 80
a 34 6
a 35 6
a 36 30
f 36
a 37 30
a 38 32
a 39 27
a 40 28
a 41 56
a 42 6
a 43 6
a 44 31
f 44
a 45 31
a 46 32
a 47 28
a 48 28
a 49 40
a 50 6
a 51 6
a 52 34
f 52
a 53 34
a 54 32
a 55 31
a 56 28
a 57 48
a 58 6
a 59 6
a 60 34
f 60
a 61 34
a 62 32
a 63 31
a 64 28
a 65 212
a 66 6
a 67 6
a 68 33
f 68
a 69 33
a 70 32
a 71 30
a 72 28
a 73 104
a 74 6
a 75 6
a 76 30
f 76
a 77 30
a 78 32
a 79 27
a 80 28
a 81 472
a 82 6
a 83 6
a 84 33
f 84
a 85 33
a 86 32
a 87 30
a 88 28
a 89 52
a 90 6
a 91 6
a 92 31
f 92
a 93 31
a 94 32
a 95 28
a 96 28
a 97 380
a 98 6
a 99 6
a 100 6
f 0
a 101 22
a 102 10
a 103 4072
a 104 4072
a 105 40
a 106 536
r 107 5
a 108 49
f 108
a 109 49
a 110 32
a 111 46
a 112 28
a 113 49
f 113
a 114 49
f 114
a 115 256
a 116 28
a 117 32
a 118 8
a 119 640
a 120 128
f 116
f 117
f 118
f 119
f 106
f 105
f 103
f 104

205
malloclab/traces/rulsr.rep Normal file
View File

@ -0,0 +1,205 @@
1
40
200
0
a 39 512
a 3 16
a 28 16
a 0 16
a 19 16
a 23 16
a 25 16
f 23
a 9 16
a 12 16
f 39
a 20 512
a 24 16
f 25
a 36 16
a 38 512
f 28
a 28 512
a 16 16
f 12
a 13 16
a 30 512
f 20
a 11 512
a 2 512
a 31 512
f 36
a 4 512
a 26 512
f 11
a 11 512
a 29 16
a 23 512
f 29
f 13
f 19
a 37 512
a 7 16
f 7
f 16
f 4
a 22 16
a 20 16
a 8 512
f 22
f 38
a 22 16
f 28
a 14 512
a 10 512
a 6 512
a 4 512
f 23
a 18 16
f 4
f 0
a 19 16
a 33 16
a 34 512
a 4 512
a 38 16
f 11
a 27 16
f 18
f 2
f 26
a 2 16
f 14
f 34
f 8
f 2
f 9
a 21 16
a 25 16
a 28 16
a 29 512
f 37
f 3
a 2 16
f 27
a 8 16
f 8
a 9 16
a 18 16
a 17 512
a 23 16
f 29
f 20
f 19
a 32 512
f 9
a 20 16
a 36 512
a 14 16
f 24
a 1 512
a 5 512
a 9 512
f 33
f 6
a 24 16
a 13 512
f 22
f 10
a 10 16
f 13
f 2
a 29 16
f 21
a 0 16
f 14
f 4
a 6 512
a 8 512
a 34 16
a 19 512
f 23
f 0
a 2 512
f 10
f 28
a 37 512
f 30
f 31
a 21 512
a 28 512
f 29
a 11 512
f 5
a 15 512
f 37
a 5 512
f 2
f 18
a 7 512
a 10 512
a 26 512
f 9
f 10
a 13 16
f 5
a 39 512
a 14 16
a 22 512
f 6
a 9 512
a 5 16
a 12 512
f 21
f 28
a 16 16
a 37 16
a 23 16
f 11
f 32
f 12
a 29 512
a 10 512
f 14
f 20
f 16
f 23
a 28 16
a 6 16
f 1
f 9
a 14 512
a 2 512
f 39
a 35 512
a 18 512
a 21 512
f 13
f 36
f 14
a 36 16
f 15
f 34
f 38
f 19
a 15 16
a 4 16
f 7
a 19 512
a 20 16
a 1 512
a 12 16
a 39 512
f 1
f 19
a 27 16
f 36
f 4
a 38 16
f 12
f 15
f 18
f 25
f 39
f 22
a 9 512

6499
malloclab/traces/seglist.rep Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,16 @@
1
6
12
1
a 0 2040
a 1 2040
f 1
a 2 48
a 3 4072
f 3
a 4 4072
f 0
f 2
a 5 4072
f 4
f 5

View File

@ -0,0 +1,16 @@
1
6
12
1
a 0 2040
a 1 2040
f 1
a 2 48
a 3 4072
f 3
a 4 4072
f 0
f 2
a 5 4072
f 4
f 5

View File

@ -0,0 +1,16 @@
1
6
12
1
a 0 2040
a 1 4010
a 2 48
a 3 4072
a 4 4072
a 5 4072
f 0
f 1
f 2
f 3
f 4
f 5

View File

@ -0,0 +1,16 @@
0
6
12
1
a 0 2040
a 1 4010
a 2 48
a 3 4072
a 4 4072
a 5 4072
f 0
f 1
f 2
f 3
f 4
f 5

128
malloclab/traces/stty.rep Normal file
View File

@ -0,0 +1,128 @@
1
108
124
0
r 0 16
a 1 364
r 2 800
r 3 1024
r 3 2048
f 1
a 4 40
f 4
a 5 40
a 6 32
a 7 37
a 8 28
a 9 92
a 10 6
a 11 6
a 12 37
f 12
a 13 37
a 14 32
a 15 34
a 16 28
a 17 36
a 18 6
a 19 6
a 20 35
f 20
a 21 35
a 22 32
a 23 32
a 24 28
a 25 48
a 26 6
a 27 6
a 28 33
f 28
a 29 33
a 30 32
a 31 30
a 32 28
a 33 80
a 34 6
a 35 6
a 36 30
f 36
a 37 30
a 38 32
a 39 27
a 40 28
a 41 56
a 42 6
a 43 6
a 44 31
f 44
a 45 31
a 46 32
a 47 28
a 48 28
a 49 40
a 50 6
a 51 6
a 52 34
f 52
a 53 34
a 54 32
a 55 31
a 56 28
a 57 48
a 58 6
a 59 6
a 60 34
f 60
a 61 34
a 62 32
a 63 31
a 64 28
a 65 212
a 66 6
a 67 6
a 68 33
f 68
a 69 33
a 70 32
a 71 30
a 72 28
a 73 104
a 74 6
a 75 6
a 76 30
f 76
a 77 30
a 78 32
a 79 27
a 80 28
a 81 472
a 82 6
a 83 6
a 84 33
f 84
a 85 33
a 86 32
a 87 30
a 88 28
a 89 52
a 90 6
a 91 6
a 92 31
f 92
a 93 31
a 94 32
a 95 28
a 96 28
a 97 380
a 98 6
a 99 6
a 100 6
f 0
a 101 21
a 102 9
a 103 48
f 103
a 104 48
a 105 32
a 106 45
a 107 28

123
malloclab/traces/tty.rep Normal file
View File

@ -0,0 +1,123 @@
1
104
119
0
r 0 16
a 1 364
r 2 800
r 3 1024
r 3 2048
f 1
a 4 40
f 4
a 5 40
a 6 32
a 7 37
a 8 28
a 9 92
a 10 6
a 11 6
a 12 37
f 12
a 13 37
a 14 32
a 15 34
a 16 28
a 17 36
a 18 6
a 19 6
a 20 35
f 20
a 21 35
a 22 32
a 23 32
a 24 28
a 25 48
a 26 6
a 27 6
a 28 33
f 28
a 29 33
a 30 32
a 31 30
a 32 28
a 33 80
a 34 6
a 35 6
a 36 30
f 36
a 37 30
a 38 32
a 39 27
a 40 28
a 41 56
a 42 6
a 43 6
a 44 31
f 44
a 45 31
a 46 32
a 47 28
a 48 28
a 49 40
a 50 6
a 51 6
a 52 34
f 52
a 53 34
a 54 32
a 55 31
a 56 28
a 57 48
a 58 6
a 59 6
a 60 34
f 60
a 61 34
a 62 32
a 63 31
a 64 28
a 65 212
a 66 6
a 67 6
a 68 33
f 68
a 69 33
a 70 32
a 71 30
a 72 28
a 73 104
a 74 6
a 75 6
a 76 30
f 76
a 77 30
a 78 32
a 79 27
a 80 28
a 81 472
a 82 6
a 83 6
a 84 33
f 84
a 85 33
a 86 32
a 87 30
a 88 28
a 89 52
a 90 6
a 91 6
a 92 31
f 92
a 93 31
a 94 32
a 95 28
a 96 28
a 97 380
a 98 6
a 99 6
a 100 6
f 0
a 101 21
a 102 9
a 103 4096

11917
malloclab/traces/xterm.rep Normal file

File diff suppressed because it is too large Load Diff