diff options
author | Corey Farrell <git@cfware.com> | 2018-03-14 05:27:40 -0400 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2018-03-17 01:06:33 -0400 |
commit | 4d1c9d87115d5ac6663f16d298e435cb37198653 (patch) | |
tree | 525e0d57128638ce663102e9de1fdfa3f2e0c1f9 /utils/Makefile | |
parent | d5bfba60d2c609852da2f89677e878567d133674 (diff) |
core: Stop using AST_INLINE_API for allocator functions.
This replaces AST_INLINE_API allocators in utils.h with real functions
implemented in astmm.c. Associated macro's are also moved from utils.h
to astmm.h.
Remove menuselect conflicts between MALLOC_DEBUG and DEBUG_CHAOS as they
can now be combined.
This has multiple benefits:
* Simplifies asterisk/utils.h by removing inline functions and use of
the logger.
* Removal of these inline functions decreases size of Asterisk and
module binaries by 1% or more.
* Puts memory management functions together with and without
MALLOC_DEBUG enabled, simplifying management of the code.
* Enables DEBUG_CHAOS for ASTMM_REDIRECT and bundled pjproject.
Change-Id: If9df4377f74bdbb627461b27a473123e05525887
Diffstat (limited to 'utils/Makefile')
-rw-r--r-- | utils/Makefile | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/utils/Makefile b/utils/Makefile index 3a1275407..d62d45f4f 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -86,7 +86,7 @@ clean: rm -f *.o $(ALL_UTILS) check_expr rm -f .*.d rm -f *.s *.i - rm -f md5.c strcompat.c ast_expr2.c ast_expr2.h ast_expr2f.c pbx_ael.c pval.c hashtab.c lock.c + rm -f astmm.c md5.c strcompat.c ast_expr2.c ast_expr2.h ast_expr2f.c pbx_ael.c pval.c hashtab.c lock.c rm -f aelparse.c aelbison.c conf2ael rm -f threadstorage.c rm -f utils.c strings.c poll.c version.c sha1.c astobj2.c refcounter @@ -100,11 +100,14 @@ md5.c: $(ASTTOPDIR)/main/md5.c astman: astman.o md5.o astman: LIBS+=$(NEWT_LIB) -astman.o: _ASTCFLAGS+=-DNO_MALLOC_DEBUG stereorize: stereorize.o frame.o stereorize: LIBS+=-lm +astmm.c: $(ASTTOPDIR)/main/astmm.c + $(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@" + $(CMD_PREFIX) cp "$<" "$@" + hashtab.c: $(ASTTOPDIR)/main/hashtab.c $(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@" $(CMD_PREFIX) cp "$<" "$@" @@ -134,7 +137,7 @@ ast_expr2f.c: $(ASTTOPDIR)/main/ast_expr2f.c $(CMD_PREFIX) cp "$<" "$@" ast_expr2f.o: _ASTCFLAGS+=-I$(ASTTOPDIR)/main -Wno-unused -check_expr: check_expr.o ast_expr2.o ast_expr2f.o strcompat.o threadstorage.o clicompat.o +check_expr: check_expr.o ast_expr2.o ast_expr2f.o strcompat.o threadstorage.o clicompat.o astmm.o aelbison.c: $(ASTTOPDIR)/res/ael/ael.tab.c $(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@" @@ -162,7 +165,7 @@ aelparse.c: $(ASTTOPDIR)/res/ael/ael_lex.c aelparse.o: _ASTCFLAGS+=-I$(ASTTOPDIR)/res -Wno-unused aelparse: LIBS+=-lm -aelparse: aelparse.o aelbison.o pbx_ael.o hashtab.o lock.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o pval.o extconf.o +aelparse: aelparse.o aelbison.o pbx_ael.o hashtab.o lock.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o pval.o extconf.o astmm.o threadstorage.c: $(ASTTOPDIR)/main/threadstorage.c $(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@" @@ -171,15 +174,15 @@ threadstorage.c: $(ASTTOPDIR)/main/threadstorage.c extconf.o: extconf.c -conf2ael: conf2ael.o ast_expr2f.o ast_expr2.o hashtab.o lock.o aelbison.o aelparse.o pbx_ael.o pval.o extconf.o strcompat.o +conf2ael: conf2ael.o ast_expr2f.o ast_expr2.o hashtab.o lock.o aelbison.o aelparse.o pbx_ael.o pval.o extconf.o strcompat.o astmm.o -check_expr2: $(ASTTOPDIR)/main/ast_expr2f.c $(ASTTOPDIR)/main/ast_expr2.c $(ASTTOPDIR)/main/ast_expr2.h +check_expr2: $(ASTTOPDIR)/main/ast_expr2f.c $(ASTTOPDIR)/main/ast_expr2.c $(ASTTOPDIR)/main/ast_expr2.h astmm.o $(ECHO_PREFIX) echo " [CC] ast_expr2f.c -> ast_expr2fz.o" $(CC) -g -c -I$(ASTTOPDIR)/include -DSTANDALONE $(ASTTOPDIR)/main/ast_expr2f.c -o ast_expr2fz.o $(ECHO_PREFIX) echo " [CC] ast_expr2.c -> ast_expr2z.o" $(CC) -g -c -I$(ASTTOPDIR)/include -DSTANDALONE2 $(ASTTOPDIR)/main/ast_expr2.c -o ast_expr2z.o $(ECHO_PREFIX) echo " [LD] ast_expr2fz.o ast_expr2z.o -> check_expr2" - $(CC) -g -o check_expr2 ast_expr2fz.o ast_expr2z.o -lm + $(CC) -g -o check_expr2 ast_expr2fz.o ast_expr2z.o astmm.o -lm $(ECHO_PREFIX) echo " [RM] ast_expr2fz.o ast_expr2z.o" rm ast_expr2z.o ast_expr2fz.o ./check_expr2 expr2.testinput |