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)