-
Notifications
You must be signed in to change notification settings - Fork 66
Jool's Compilation Options
Production code should probably never enable these flags. They are intended for developer consumption.
make CFLAGS_MODULE="[-DDEBUG] [-DJKMEMLEAK]"
Only the kernel modules care for CFLAGS_MODULE
at present. (ie. it does nothing on userspace tools.)
Enable global debug logging, as well as instance debug logging by default.
"make debug
" can be used instead of "make CFLAGS_MODULE=-DDEBUG
", though don't count on it working in future releases.
Compiles into Jool a kmemleak ripoff. It keeps track of all allocated objects, so long as they are reserved and released via the malloc wrappers. Prints any leaks once the module is r-modprobed:
$ sudo modprobe -r jool
$ dmesg -t | tail
Memory leaks:
struct pktqueue_session: 71011
struct foo: 123
struct bar: 5454
Yes, this is an embarrassing half-assed replacement for the real thing, but it can come in handy when you don't have time to compile another kernel. (Distros don't like to ship with kmemleak.)
Just like the original, -DJKMEMLEAK
is not free: It adds a tree add whenever something is allocated and a tree removal whenever something is destroyed.