Skip to content

2017-fall-os/2017-fall-malloc-lab-asdiamond

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

os-malloc

This directory contains:

myAllocator.c: a first-fit allocator myAllocator.h: its header file

myAllocatorTest1.c: a test program for my allocator

malloc.c: a replacement for malloc that uses my allocator test1.c: a test program that uses this replacement malloc

There are two different testers as some implementations of printf call malloc to allocate buffer space. This causes test1 to behave improperly as it uses myAllocator as a malloc replacement. In this case myAllocatorTest1 will function correctly. The only difference between the programs is that test1 uses myAllocator as a malloc replacement and myAllocatorTest1 uses myAllocator directly.

Makefile: a fairly portable "makefile", targets "all" and "clean"

To compile: $ make To clean: $ make clean

The cygwin runtime uses malloc() and brk() extensively. It is interesting to compare the output of test1 & myAllocatorTest1. All those extra allocated regions are being used by cygwin's libraries!

About

2017-fall-malloc-lab-asdiamond created by GitHub Classroom

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published