You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2011/10/03 21:48:40 UTC
svn commit: r1178541 - in /trafficserver/traffic/trunk: lib/ts/ink_memory.cc
proxy/Main.cc
Author: zwoop
Date: Mon Oct 3 19:48:40 2011
New Revision: 1178541
URL: http://svn.apache.org/viewvc?rev=1178541&view=rev
Log:
TS-567 Only use mallopt on Linux for now, we probably should get rid of this entirely
Modified:
trafficserver/traffic/trunk/lib/ts/ink_memory.cc
trafficserver/traffic/trunk/proxy/Main.cc
Modified: trafficserver/traffic/trunk/lib/ts/ink_memory.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/lib/ts/ink_memory.cc?rev=1178541&r1=1178540&r2=1178541&view=diff
==============================================================================
--- trafficserver/traffic/trunk/lib/ts/ink_memory.cc (original)
+++ trafficserver/traffic/trunk/lib/ts/ink_memory.cc Mon Oct 3 19:48:40 2011
@@ -164,6 +164,8 @@ ats_memalign_free(void *ptr)
// This effectively makes mallopt() a no-op (currently) when tcmalloc
// or jemalloc is used. This might break our usage for increasing the
// number of mmap areas (ToDo: Do we still really need that??).
+//
+// TODO: I think we might be able to get rid of this?
int
ats_mallopt(int param, int value)
{
@@ -173,7 +175,9 @@ ats_mallopt(int param, int value)
#if TS_HAS_TCMALLOC
// TODO: tcmalloc code ?
#else
+#if defined(linux)
return mallopt(param, value);
+#endif // ! defined(linux)
#endif // ! TS_HAS_TCMALLOC
#endif // ! TS_HAS_JEMALLOC
return 0;
Modified: trafficserver/traffic/trunk/proxy/Main.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Main.cc?rev=1178541&r1=1178540&r2=1178541&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Main.cc (original)
+++ trafficserver/traffic/trunk/proxy/Main.cc Mon Oct 3 19:48:40 2011
@@ -988,6 +988,7 @@ adjust_sys_settings(void)
int mmap_max = -1;
int fds_throttle = -1;
+ // TODO: I think we might be able to get rid of this?
TS_ReadConfigInteger(mmap_max, "proxy.config.system.mmap_max");
if (mmap_max >= 0)
ats_mallopt(ATS_MMAP_MAX, mmap_max);