Skip to content

Commit

Permalink
Link orchagent against jemalloc (sonic-net#3473)
Browse files Browse the repository at this point in the history
What I did
Force orchagent to use jemalloc instead of the standard glibc malloc implementation.

Why I did it
Glibc's malloc implementation can result in memory fragmentation which prevents orchagent from returning freed memory to the kernel - this results in excessively high memory utilization.
  • Loading branch information
theasianpianist authored Jan 28, 2025
1 parent 64c180c commit ca13857
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion orchagent/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ orchagent_SOURCES += p4orch/p4orch.cpp \

orchagent_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_SAI) $(CFLAGS_ASAN)
orchagent_CPPFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_SAI) $(CFLAGS_ASAN)
orchagent_LDADD = $(LDFLAGS_ASAN) -lnl-3 -lnl-route-3 -lpthread -lsairedis -lsaimeta -lsaimetadata -lswsscommon -lzmq -lprotobuf -ldashapi
orchagent_LDADD = $(LDFLAGS_ASAN) -lnl-3 -lnl-route-3 -lpthread -lsairedis -lsaimeta -lsaimetadata -lswsscommon -lzmq -lprotobuf -ldashapi -ljemalloc

routeresync_SOURCES = routeresync.cpp
routeresync_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_ASAN)
Expand Down

0 comments on commit ca13857

Please sign in to comment.