aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--src/benchmarks/realloc/realloc.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 397d6ba..6f9713e 100644
--- a/Makefile
+++ b/Makefile
@@ -7,8 +7,7 @@ export CXX = g++
export WARNFLAGS = -Wall -Wextra
export COMMONFLAGS = -fno-builtin -fPIC -DPIC -pthread
-# export OPTFLAGS = -O3 -DNDEBUG
-export OPTFLAGS = -O0 -g
+export OPTFLAGS = -O3 -DNDEBUG
export CFLAGS = -I. $(OPTFLAGS) $(WARNFLAGS) $(COMMONFLAGS)
export CXXFLAGS = -std=c++11 $(CFLAGS) -fno-exceptions
@@ -20,7 +19,7 @@ export LDXXFLAGS = $(LDFLAGS) -static-libstdc++
all: $(OBJDIR)/ccinfo $(MAKEFILES)
$(MAKEFILES):
- $(MAKE) -C $@ OBJDIR=$(OBJDIR)/$(shell echo $@ | sed s/src//)
+ $(MAKE) -C $@ OBJDIR=$(OBJDIR)$(shell echo $@ | sed s/src//)
$(OBJDIR)/ccinfo: | $(OBJDIR)
$(CC) -v 2> $@
diff --git a/src/benchmarks/realloc/realloc.c b/src/benchmarks/realloc/realloc.c
index 2eddc26..b6e6034 100644
--- a/src/benchmarks/realloc/realloc.c
+++ b/src/benchmarks/realloc/realloc.c
@@ -4,7 +4,7 @@
size_t* array;
size_t steps = 1;
int main() {
- for (int i = 0; i < 100; i++) {
+ for (int i = 1; i < 100; i++) {
if ((array = realloc(array, sizeof(size_t) * steps * i)) == NULL) {
perror("realloc");
return 1;