Skip to content

Commit

Permalink
Makefile.defs: compile with system malloc for pkg if MEMPKG=sys
Browse files Browse the repository at this point in the history
- if MEMDBGSYS=1, the use a debug variant for system malloc

(cherry picked from commit cee1de7)
  • Loading branch information
miconda committed Aug 29, 2017
1 parent 964ca6b commit 29d8714
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/Makefile.defs
Expand Up @@ -653,9 +653,13 @@ C_DEFS= $(extra_defs) \
-D__CPU_$(ARCH) $(os_defs) \
-DSER_VER=$(SER_VER) \
-DCFG_DIR='"$(cfg_target)"'\
-DRUN_DIR='"$(run_target)"'\
-DPKG_MALLOC \
-DSHM_MEM -DSHM_MMAP \
-DRUN_DIR='"$(run_target)"'

ifneq ($(MEMPKG), sys)
C_DEFS+= -DPKG_MALLOC
endif

C_DEFS+= -DSHM_MEM -DSHM_MMAP \
-DDNS_IP_HACK \
-DUSE_MCAST \
-DUSE_TCP \
Expand Down Expand Up @@ -699,8 +703,16 @@ C_DEFS+= -DF_MALLOC
C_DEFS+= -DQ_MALLOC
# enable TLSF malloc
C_DEFS+= -DTLSF_MALLOC
ifeq ($(MEMDBG), 1)

ifeq ($(MEMDBG), 1)
C_DEFS+= -DDBG_SR_MEMORY

ifeq ($(MEMPKG), sys)
ifeq ($(MEMDBGSYS), 1)
C_DEFS+= -DDBG_SYS_MEMORY
endif
endif

endif

ifneq ($(PKG_MEM_SIZE),)
Expand Down

0 comments on commit 29d8714

Please sign in to comment.