[Kamailio-Devel] cleanup old #defines in core

Henning Westerholt henning.westerholt at 1und1.de
Fri Aug 22 17:10:08 CEST 2008


Hi all,

i just want to ask if somebody compiles with one of the following defines 
changed:

1) SHM_MEM not set
2) STATIC_{$MODNAME} (e.g. SL, USRLOC, TM..) set
3) DEBUG_DMALLOC set

Some notes about the purpose (according my knowledge):

1: Used to disable the shared memory support in the core. At the moment the 
core don't compile anymore with this define set, let alone most of the 
modules (i think). Without SHM_MEM support there is no locking, and 
shm_malloc, so i don't think its necessary/ possible anymore to work without 
it.

2: Used to compile modules statically. Not sure why this was used in the past. 
If STATIC_SL, STATIC_TM.. is set, the core doesn't link anymore.

3. Include the dmalloc.h (debugging malloc) library in some core files. This 
re-implements malloc and friends with some additional debugging informations. 
As there are no plain malloc functions used in the core, this is not needed 
anymore. The pkg_malloc also implement own debugging functions.

IMHO removing this defines would be a good cleanup for the core, in order to 
decrease the number of possible code paths, making it easier to understand. 
Any comments on this?

Thanks,

Henning




More information about the Devel mailing list