Skip to content

Commit 839061e

Browse files
vaibsharmasuntong
authored andcommitted
memory leak issue fixed with jemalloc (h2non#381)
1 parent 275ed66 commit 839061e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Dockerfile

+9
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ RUN DEBIAN_FRONTEND=noninteractive \
8787
apt-get clean && \
8888
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
8989

90+
ADD https://github.com/jemalloc/jemalloc/releases/download/5.2.1/jemalloc-5.2.1.tar.bz2 /tmp/jemalloc-5.2.1.tar.bz2
91+
RUN apt-get update && apt install -y bzip2 gcc make autoconf
92+
RUN cd /tmp \
93+
&& tar -jxvf jemalloc-5.2.1.tar.bz2 --no-same-owner \
94+
&& cd jemalloc-5.2.1 \
95+
&& ./configure --enable-prof && make && make install \
96+
&& rm -rf /tmp/*
97+
ENV LD_PRELOAD=/usr/local/lib/libjemalloc.so
98+
9099
# Server port to listen
91100
ENV PORT 9000
92101

0 commit comments

Comments
 (0)