Coder Social home page Coder Social logo

14513-malloc-lab's Introduction

#############################
# CS:APP Malloc Lab
# Handout files for students
#############################

***********
Main Files:
***********

mdriver, mdriver-emulate
        Once you've run make, run ./mdriver to test
        your solution.  Run ./mdriver-emulate to make sure your
        solution can handle 64-bit allocations

traces/
	Directory that contains the trace files that the driver uses
	to test your solution. Files with names of the form XXX-short.rep
	contain very short traces that you can use for debugging.

**********************************
Other support files for the driver
**********************************
config.h	Configures the malloc lab driver
clock.{c,h}	Low-level timing functions
fcyc.{c,h}	Function-level timing functions
memlib.{c,h}	Models the heap and sbrk function
stree.{c,h}     Data structure used by the driver to check for
		overlapping allocations
MLabInst.so	Code that combines with LLVM compiler infrastructure
		to enable sparse memory emulation
macro-check.pl  Code to check for disallowed macro definitions
driver.pl	Runs both mdriver and mdriver-emulate and generates
		the autolab result.  (Not included with checkpoint)
calibrate.pl   Code to generate benchmark throughput
throughputs.txt Benchmark throughputs, indexed by CPU type

***********************
Malloc packages
***********************
mm.c            The core implementation of memory management
mm-naive.c      Fast but extremely memory-inefficient package

*******************************
Building and running the driver
*******************************
To build the driver, type "make" to the shell.

To run the driver on a tiny test trace:

	unix> ./mdriver -V -f traces/malloc.rep

To get a list of the driver flags:

	unix> ./mdriver -h

The -V option prints out helpful tracing information

You can use mdriver-dbg to test your code with the DEBUG preprocessor
flag set to 1. This enables the dbg_* macros such as dbg_printf, which
you can use to print debugging output. It also uses the optimization
level -Og, which helps GDB display more meaningful debug information.

	unix> ./mdriver-dbg

You can use mdriver-emulate to test the correctness of your code in
handling 64-bit addresses:

	unix> ./mdriver-emulate

You should see the exact same utilization numbers as you did with the
regular driver.  No timing is done, and so the time and throughput
numbers show up as zeros.

14513-malloc-lab's People

Contributors

yahuiliang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.