aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2001-10-16 00:23:58 +0000
committerH. Peter Anvin <hpa@zytor.com>2001-10-16 00:23:58 +0000
commit5600c4f20304d1a6c5f763a0c86f1a95f7bac47d (patch)
treecf7f8e26ddea55cf58fb1c7d5dd3572b311bfabd
parente1762ed1c23b53b26e6841f4bba1a5688e98a2dd (diff)
downloadlpsm-5600c4f20304d1a6c5f763a0c86f1a95f7bac47d.tar.gz
lpsm-5600c4f20304d1a6c5f763a0c86f1a95f7bac47d.tar.xz
lpsm-5600c4f20304d1a6c5f763a0c86f1a95f7bac47d.zip
Set up different flags for debugging and production; change an
assert(0); to abort(); so it works for production as well.
-rw-r--r--Makefile5
-rw-r--r--alloc.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 0ea28af..31de296 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,10 @@ OSOBJ = objstore.o alloc.o
OSPICOBJ = $(patsubst %.o,%.pic.o,$(OSOBJ))
CC = gcc
-CFLAGS = -Wall -O2 -g -D_FILE_OFFSET_BITS=64
+# This is a reasonable set of flags for production
+# CFLAGS = -Wall -O3 -fomit-frame-pointer -DNDEBUG -D_FILE_OFFSET_BITS=64
+# This is for debugging
+CFLAGS = -Wall -O -g -D_FILE_OFFSET_BITS=64
PICFLAGS = $(CFLAGS) -fPIC
SOFLAGS = -shared
diff --git a/alloc.c b/alloc.c
index dce15d3..02087e6 100644
--- a/alloc.c
+++ b/alloc.c
@@ -635,7 +635,7 @@ static struct buddy_params objstore_find_alloc_buddy(void *ptr)
}
}
- assert(0); /* Freeing bogus memory? */
+ abort(); /* Freeing bogus memory? */
}
static void objstore_free_buddy(void *ptr)