You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2015/05/05 06:21:16 UTC
[04/11] trafficserver git commit: Only use M_MMAP_MAX on systems that
have a definition.
Only use M_MMAP_MAX on systems that have a definition.
(cherry picked from commit a777a14a03d278623f31baa48ee5f8f03f5dec08)
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/904c18a0
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/904c18a0
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/904c18a0
Branch: refs/heads/5.3.x
Commit: 904c18a03a2bec74e51574946a259e1dc5814dde
Parents: ebc83f7
Author: James Peach <jp...@apache.org>
Authored: Thu Apr 23 08:56:47 2015 -0700
Committer: Phil Sorber <so...@apache.org>
Committed: Thu Apr 23 10:24:13 2015 -0600
----------------------------------------------------------------------
lib/ts/ink_memory.h | 3 ---
proxy/Main.cc | 4 ++--
2 files changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/904c18a0/lib/ts/ink_memory.h
----------------------------------------------------------------------
diff --git a/lib/ts/ink_memory.h b/lib/ts/ink_memory.h
index 69285f0..469d0f1 100644
--- a/lib/ts/ink_memory.h
+++ b/lib/ts/ink_memory.h
@@ -47,12 +47,9 @@
#if TS_HAS_JEMALLOC
#include <jemalloc/jemalloc.h>
-/* TODO: Should this have a value ? */
-#define ATS_MMAP_MAX 0
#else
#if HAVE_MALLOC_H
#include <malloc.h>
-#define ATS_MMAP_MAX M_MMAP_MAX
#endif // ! HAVE_MALLOC_H
#endif // ! TS_HAS_JEMALLOC
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/904c18a0/proxy/Main.cc
----------------------------------------------------------------------
diff --git a/proxy/Main.cc b/proxy/Main.cc
index 1e97448..393dc2d 100644
--- a/proxy/Main.cc
+++ b/proxy/Main.cc
@@ -978,12 +978,12 @@ adjust_sys_settings(void)
rlim_t maxfiles;
// TODO: I think we might be able to get rid of this?
-#if defined(ATS_MMAP_MAX)
+#if defined(M_MMAP_MAX)
int mmap_max = -1;
REC_ReadConfigInteger(mmap_max, "proxy.config.system.mmap_max");
if (mmap_max >= 0)
- ats_mallopt(ATS_MMAP_MAX, mmap_max);
+ ats_mallopt(M_MMAP_MAX, mmap_max);
#endif
maxfiles = ink_get_max_files();