1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00
Files
amiga-clib2/test_programs/GNUmakefile.68k
Olaf Barthel 0c5b88d2d3 Slab allocator changes
If the first slab in the list of slabs which share the same chunk size has no more room, it means that all other slabs following it have no room either. This speeds up the test to find a slab with free space, which can now abort and directly proceed to allocate memory for a new slab.

If an empty slab's decay count hits zero, it is moved to the front of the empty slab list to be reclaimed more quickly.

Allocations made from the slab now carry a pointer back to the slab which they are a part of. This speeds up deallocation but has the downside of making the smallest usable slab chunk size 64 bytes, which is double what used to be the minimum before.
2016-11-22 11:07:38 +01:00

159 lines
4.7 KiB
Plaintext

#
# $Id: GNUmakefile.68k,v 1.15 2006-09-25 18:20:09 obarthel Exp $
#
# :ts=8
#
##############################################################################
CC = gcc
DELETE = delete all quiet
##############################################################################
.c.o:
@echo "Compiling $<"
@$(CC) -c $(CFLAGS) $<
##############################################################################
#CODE_TYPE := -fbaserel -DSMALL_DATA -m68020-60 -DM68020
#CODE_TYPE := -fbaserel -DSMALL_DATA -m68000
#CODE_TYPE := -fbaserel32 -DSMALL_DATA32 -m68020-60 -DM68020
CODE_TYPE := -m68020-60 -DM68020
#CODE_TYPE := -m68000
##############################################################################
WARNINGS = \
-Wall -W -Wshadow -Wpointer-arith -Wsign-compare -Wmissing-prototypes \
-Wundef -Wbad-function-cast -Wmissing-declarations -Wconversion
INCLUDE = -I../library/include
LIB = -L../library/lib
OPTIONS = -DNDEBUG -fno-builtin -fwritable-strings -DNO_INLINE_STDARG -DIEEE_FLOATING_POINT_SUPPORT -DVERBOSE
#OPTIONS = -D__MEM_DEBUG -fno-builtin
#OPTIONS = -DDEBUG -D__MEM_DEBUG -DNO_INLINE_STDARG -fno-builtin
OPTIMIZE = -O
#OPTIMIZE = -O2 -fomit-frame-pointer
DEBUG = -ggdb
CFLAGS = $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(CODE_TYPE) $(INCLUDE) $(LIB)
##############################################################################
LIBS = -lm -lc -lgcc
##############################################################################
all: test fgets_test iotest sscanf_test printf_test sprintf_test \
stack_size_test translate_test strtok_test uname simple \
fstat_stdout_test simple_sprintf date_test sscanf_64 factorial \
execvp_test setlocale rand fstat_test base_dir_nametest \
malloc-test
clean:
$(DELETE) #?.o #?.map test fgets_test iotest sscanf_test printf_test \
sprintf_test stack_size_test translate_test strtok_test uname \
simple fstat_stdout_test fstat_test simple_sprintf date_test sscanf_64 \
factorial execvp_test setlocale rand base_dir_nametest \
malloc-test
##############################################################################
setlocale : setlocale.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ setlocale.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
test : test.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
fgets_test : fgets_test.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ fgets_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
strtok_test : strtok_test.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ strtok_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
iotest : iotest.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ iotest.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
sscanf_test : sscanf_test.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ sscanf_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
printf_test : printf_test.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ printf_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
sprintf_test : sprintf_test.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ sprintf_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
stack_size_test : stack_size_test.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ stack_size_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
translate_test : translate_test.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ translate_test.o -lunix $(LIBS) -Wl,--cref,-M,-Map=$@.map
uname : uname.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ uname.o -lunix $(LIBS) -Wl,--cref,-M,-Map=$@.map
simple : simple.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ simple.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
fstat_stdout_test : fstat_stdout_test.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ fstat_stdout_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
fstat_test : fstat_test.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ fstat_test.o -lunix $(LIBS) -Wl,--cref,-M,-Map=$@.map
simple_sprintf : simple_sprintf.o
@echo "Linking $@"
$(CC) -nostdlib $(CFLAGS) -o $@ simple_sprintf.o -lc -lgcc -Wl,--cref,-M,-Map=$@.map
date_test : date_test.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ date_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
sscanf_64 : sscanf_64.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ sscanf_64.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
factorial : factorial.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ factorial.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
execvp_test : execvp_test.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ execvp_test.o -lunix $(LIBS) -Wl,--cref,-M,-Map=$@.map
base_dir_nametest : base_dir_nametest.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ base_dir_nametest.o -lunix $(LIBS) -Wl,--cref,-M,-Map=$@.map
rand : rand.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ rand.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
malloc-test: malloc-test.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ rand.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
##############################################################################
mkid:
mkid -v #?.(c|h|asm|i)
update:
mkid -v -u