Updated Branches:
refs/heads/master 8323ba18f -> f7aeda9a7
TS-2546 Move xptr and _xstrdup to ink_memory.{h,cc}
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/f7aeda9a
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/f7aeda9a
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/f7aeda9a
Branch: refs/heads/master
Commit: f7aeda9a77ba9c02f51ab8d3a01152961600e7ac
Parents: 8323ba1
Author: Leif Hedstrom <[email protected]>
Authored: Sat Feb 1 16:12:15 2014 -0700
Committer: Leif Hedstrom <[email protected]>
Committed: Sat Feb 1 16:12:19 2014 -0700
----------------------------------------------------------------------
CHANGES | 2 +
cmd/traffic_shell/CliMgmtUtils.cc | 1 -
iocore/eventsystem/I_IOBuffer.h | 1 +
iocore/eventsystem/P_IOBuffer.h | 4 +-
lib/ts/Compatability.h | 1 -
lib/ts/List.h | 1 -
lib/ts/SimpleTokenizer.h | 1 -
lib/ts/Tokenizer.cc | 2 +-
lib/ts/ink_base64.cc | 1 -
lib/ts/ink_hash_table.cc | 1 -
lib/ts/ink_lockfile.h | 1 -
lib/ts/ink_memory.cc | 20 ++++++
lib/ts/ink_memory.h | 112 +++++++++++++++++++++++++++++++-
lib/ts/ink_queue.cc | 1 -
lib/ts/ink_queue_ext.cc | 1 -
lib/ts/ink_resource.cc | 23 +------
lib/ts/ink_resource.h | 114 +--------------------------------
lib/ts/libts.h | 1 -
mgmt/MultiFile.cc | 1 -
mgmt/api/EventCallback.cc | 1 -
mgmt/api/GenericParser.h | 1 -
mgmt/utils/ExpandingArray.cc | 2 +-
mgmt/web2/WebHttpMessage.cc | 1 -
mgmt/web2/WebHttpSession.cc | 1 -
proxy/hdrs/HdrToken.h | 1 -
25 files changed, 139 insertions(+), 157 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 97866db..d11a535 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 4.2.0
+ *) [TS-2546] Move xptr and _xstrdup to ink_memory.{h,cc}.
+
*) [TS-2180] Small memory leak in RecCore.cc, from previous refactoring.
*) [TS-2534] Make sure RecRecord structs are always properly initialized.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/cmd/traffic_shell/CliMgmtUtils.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/CliMgmtUtils.cc
b/cmd/traffic_shell/CliMgmtUtils.cc
index 222e334..72c2ee8 100644
--- a/cmd/traffic_shell/CliMgmtUtils.cc
+++ b/cmd/traffic_shell/CliMgmtUtils.cc
@@ -28,7 +28,6 @@
#include <unistd.h>
#include "CliMgmtUtils.h"
#include "CliDisplay.h"
-#include "ink_resource.h"
#include "definitions.h"
#include "ConfigCmd.h"
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/iocore/eventsystem/I_IOBuffer.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/I_IOBuffer.h b/iocore/eventsystem/I_IOBuffer.h
index c27ba93..0e5fe0c 100644
--- a/iocore/eventsystem/I_IOBuffer.h
+++ b/iocore/eventsystem/I_IOBuffer.h
@@ -40,6 +40,7 @@
#define I_IOBuffer_h
#include "libts.h"
+#include "ink_resource.h"
struct MIOBufferAccessor;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/iocore/eventsystem/P_IOBuffer.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/P_IOBuffer.h b/iocore/eventsystem/P_IOBuffer.h
index c0ad45b..20e1405 100644
--- a/iocore/eventsystem/P_IOBuffer.h
+++ b/iocore/eventsystem/P_IOBuffer.h
@@ -25,7 +25,10 @@
#if !defined (_P_IOBuffer_h)
#define _P_IOBuffer_h
+
#include "libts.h"
+#include "ink_resource.h"
+
// TODO: I think we're overly aggressive here on making MIOBuffer 64-bit
// but not sure it's worthwhile changing anything to 32-bit honestly.
@@ -133,7 +136,6 @@ iobufferblock_skip(IOBufferBlock * b, int64_t *poffset,
int64_t *plen, int64_t w
}
#ifdef TRACK_BUFFER_USER
-struct Resource;
extern Resource *res_lookup(const char *path);
TS_INLINE void
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/lib/ts/Compatability.h
----------------------------------------------------------------------
diff --git a/lib/ts/Compatability.h b/lib/ts/Compatability.h
index b8df906..0cbc2fb 100644
--- a/lib/ts/Compatability.h
+++ b/lib/ts/Compatability.h
@@ -31,7 +31,6 @@
#include <strings.h>
#include "ink_defs.h"
-#include "ink_resource.h"
// We can't use #define for min and max becuase it will conflict with
// other declarations of min and max functions. This conflict
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/lib/ts/List.h
----------------------------------------------------------------------
diff --git a/lib/ts/List.h b/lib/ts/List.h
index d08ca54..ffe997a 100644
--- a/lib/ts/List.h
+++ b/lib/ts/List.h
@@ -58,7 +58,6 @@
#include "ink_assert.h"
#include "ink_queue.h"
-#include "ink_resource.h"
#include "Compatability.h"
#include "defalloc.h"
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/lib/ts/SimpleTokenizer.h
----------------------------------------------------------------------
diff --git a/lib/ts/SimpleTokenizer.h b/lib/ts/SimpleTokenizer.h
index 2b2e549..25e8f0f 100644
--- a/lib/ts/SimpleTokenizer.h
+++ b/lib/ts/SimpleTokenizer.h
@@ -27,7 +27,6 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
-#include "ink_resource.h"
/*-----------------------------------------------------------------------------
SimpleTokenizer
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/lib/ts/Tokenizer.cc
----------------------------------------------------------------------
diff --git a/lib/ts/Tokenizer.cc b/lib/ts/Tokenizer.cc
index 3e5a94c..459e54e 100644
--- a/lib/ts/Tokenizer.cc
+++ b/lib/ts/Tokenizer.cc
@@ -25,7 +25,7 @@
#include "ink_platform.h"
#include "Tokenizer.h"
#include "ink_assert.h"
-#include "ink_resource.h"
+#include "ink_memory.h"
/****************************************************************************
*
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/lib/ts/ink_base64.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_base64.cc b/lib/ts/ink_base64.cc
index 539c87f..ee87324 100644
--- a/lib/ts/ink_base64.cc
+++ b/lib/ts/ink_base64.cc
@@ -33,7 +33,6 @@
*/
#include "libts.h"
#include "ink_assert.h"
-#include "ink_resource.h"
// TODO: The code here seems a bit klunky, and could probably be improved a
bit.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/lib/ts/ink_hash_table.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_hash_table.cc b/lib/ts/ink_hash_table.cc
index 2ae4395..3eb8e8d 100644
--- a/lib/ts/ink_hash_table.cc
+++ b/lib/ts/ink_hash_table.cc
@@ -33,7 +33,6 @@
#include "ink_error.h"
#include "ink_hash_table.h"
#include "ink_memory.h"
-#include "ink_resource.h"
/*===========================================================================*
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/lib/ts/ink_lockfile.h
----------------------------------------------------------------------
diff --git a/lib/ts/ink_lockfile.h b/lib/ts/ink_lockfile.h
index 93fea02..900c932 100644
--- a/lib/ts/ink_lockfile.h
+++ b/lib/ts/ink_lockfile.h
@@ -24,7 +24,6 @@
#ifndef __INK_LOCKFILE_H__
#define __INK_LOCKFILE_H__
-#include "ink_resource.h"
#include "ink_defs.h"
#include "ink_string.h"
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/lib/ts/ink_memory.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_memory.cc b/lib/ts/ink_memory.cc
index e4df7a1..91aa403 100644
--- a/lib/ts/ink_memory.cc
+++ b/lib/ts/ink_memory.cc
@@ -219,3 +219,23 @@ ats_mlock(caddr_t addr, size_t len)
int res = mlock(a, l);
return res;
}
+
+
+/*-------------------------------------------------------------------------
+ Moved from old ink_resource.h
+ -------------------------------------------------------------------------*/
+char *
+_xstrdup(const char *str, int length, const char* /* path ATS_UNUSED */)
+{
+ char *newstr;
+
+ if (likely(str)) {
+ if (length < 0)
+ length = strlen(str);
+
+ newstr = (char *)ats_malloc(length + 1);
+ ink_strlcpy(newstr, str, length + 1);
+ return newstr;
+ }
+ return NULL;
+}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/lib/ts/ink_memory.h
----------------------------------------------------------------------
diff --git a/lib/ts/ink_memory.h b/lib/ts/ink_memory.h
index a6258f8..edc0ee1 100644
--- a/lib/ts/ink_memory.h
+++ b/lib/ts/ink_memory.h
@@ -106,6 +106,9 @@ extern "C" {
return page_size;
}
+/* Some convenience wrappers around strdup() functionality */
+char *_xstrdup(const char *str, int length, const char *path);
+
#define ats_strdup(p) _xstrdup((p), -1, NULL)
#define ats_strndup(p,n) _xstrdup((p), n, NULL)
@@ -142,11 +145,114 @@ extern "C" {
*/
template < typename T > inline void
-ink_zero(
- T& t ///< Object to zero.
- ) {
+ink_zero(T& t) {
memset(&t, 0, sizeof(t));
}
+
+/** Locally scoped holder for a chunk of memory allocated via these functions.
+ If this pointer is assigned the current memory (if any) is freed.
+ The memory is also freed when the object is destructed. This makes
+ handling temporary memory in a function more robust.
+
+ @internal A poor substitute for a real shared pointer copy on write
+ class but one step at a time. It's better than doing this by
+ hand every time.
+*/
+template <typename T> class xptr {
+ public:
+ typedef xptr self;
+
+ xptr()
+ : m_ptr(0)
+ { }
+
+ /// Construct from allocated memory.
+ /// @note @a ptr must refer to memory allocated @c ats_malloc.
+ explicit xptr(T* ptr)
+ : m_ptr(ptr)
+ { }
+
+ /// Construct and initialized with memory for @a n instances of @a T.
+ explicit xptr(size_t n)
+ : m_ptr((T *)ats_malloc(sizeof(T) * n))
+ { }
+
+ /// Destructor - free memory held by this instance.
+ ~xptr()
+ {
+ ats_free(m_ptr);
+ }
+
+ /// Assign memory.
+ /// @note @a ptr must be allocated via @c ats_malloc.
+ self& operator = (T* ptr) {
+ ats_free(m_ptr);
+ m_ptr = ptr;
+ return *this;
+ }
+
+ /// Auto convert to a raw pointer.
+ operator T* () { return m_ptr; }
+
+ /// Auto convert to raw pointer.
+ operator T const* () const { return m_ptr; }
+
+ /// Boolean operator. Returns true if we are pointing to valid memory.
+ operator bool() const { return m_ptr != 0; }
+
+ /** Release memory from control of this instance.
+
+ @note Although direct assignment is forbidden due to the
+ non-obvious semantics, a pointer can be moved (@b not copied) from
+ one instance to another using this method.
+ @code
+ new_ptr = old_ptr.release();
+ @endcode
+ This is by design so any such transfer is always explicit.
+ */
+ T* release() {
+ T* zret = m_ptr;
+ m_ptr = 0;
+ return zret;
+ }
+
+ private:
+ T* m_ptr; ///< Pointer to allocated memory.
+
+ /// Copy constructor - forbidden.
+ xptr(self const& that);
+
+ /// Self assignment - forbidden.
+ self& operator = (self const& that);
+};
+
+
+// Special operators for xptr<char>
+/** Combine two strings as file paths.
+ Trailing and leading separators for @a lhs and @a rhs respectively
+ are handled to yield exactly one separator.
+ @return A newly @x ats_malloc string of the combined paths.
+*/
+inline char*
+path_join (xptr<char> const& lhs, xptr<char> const& rhs)
+{
+ size_t ln = strlen(lhs);
+ size_t rn = strlen(rhs);
+ char const* rptr = rhs; // May need to be modified.
+
+ if (ln && lhs[ln-1] == '/') --ln; // drop trailing separator.
+ if (rn && *rptr == '/') --rn, ++rptr; // drop leading separator.
+
+ char* x = static_cast<char*>(ats_malloc(ln + rn + 2));
+
+ memcpy(x, lhs, ln);
+ x[ln] = '/';
+ memcpy(x + ln + 1, rptr, rn);
+ x[ln+rn+1] = 0; // terminate string.
+
+ return x;
+}
+
#endif /* __cplusplus */
#endif
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/lib/ts/ink_queue.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_queue.cc b/lib/ts/ink_queue.cc
index 9b2f8ab..c94e32d 100644
--- a/lib/ts/ink_queue.cc
+++ b/lib/ts/ink_queue.cc
@@ -48,7 +48,6 @@
#include "ink_memory.h"
#include "ink_error.h"
#include "ink_assert.h"
-#include "ink_resource.h"
#include "ink_queue_ext.h"
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/lib/ts/ink_queue_ext.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_queue_ext.cc b/lib/ts/ink_queue_ext.cc
index 4352487..76ef902 100644
--- a/lib/ts/ink_queue_ext.cc
+++ b/lib/ts/ink_queue_ext.cc
@@ -40,7 +40,6 @@
#include "ink_memory.h"
#include "ink_error.h"
#include "ink_assert.h"
-#include "ink_resource.h"
#include "ink_stack_trace.h"
#include "ink_queue_ext.h"
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/lib/ts/ink_resource.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_resource.cc b/lib/ts/ink_resource.cc
index d37cfa1..b23dcf5 100644
--- a/lib/ts/ink_resource.cc
+++ b/lib/ts/ink_resource.cc
@@ -25,31 +25,10 @@
#include "ink_assert.h"
#include "ink_atomic.h"
-#include "ink_defs.h"
#include "ink_resource.h"
#include "ink_stack_trace.h"
-volatile int res_track_memory = RES_TRACK_MEMORY_DEFAULT;
-
-/*-------------------------------------------------------------------------
--------------------------------------------------------------------------*/
-char *
-_xstrdup(const char *str, int length, const char* /* path ATS_UNUSED */)
-{
- char *newstr;
-
- if (likely(str)) {
- if (length < 0)
- length = strlen(str);
-
- newstr = (char *)ats_malloc(length + 1);
- ink_strlcpy(newstr, str, length + 1);
- return newstr;
- }
- return NULL;
-}
-
-typedef struct Resource Resource;
+volatile int res_track_memory = 0; // Disabled by default
Resource *
res_lookup(const char */* path ATS_UNUSED */)
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/lib/ts/ink_resource.h
----------------------------------------------------------------------
diff --git a/lib/ts/ink_resource.h b/lib/ts/ink_resource.h
index ba4f17a..c62e22c 100644
--- a/lib/ts/ink_resource.h
+++ b/lib/ts/ink_resource.h
@@ -48,118 +48,6 @@ struct Resource
int64_t baseline;
};
-// TODO: TS-567 Support turning this off in the case of "memory debugging"
being
-// enabled in the ./configure phase. Also, figure out if / how this could
integrate
-// with jemalloc / tcmalloc's features of enabling memory debugging.
-#define RES_TRACK_MEMORY_DEFAULT 0 /* default value for res_track_memory
variable */
-
-char *_xstrdup(const char *str, int length, const char *path);
-
-#if defined(__cplusplus)
-/** Locally scoped holder for a chunk of memory allocated via these functions.
- If this pointer is assigned the current memory (if any) is freed.
- The memory is also freed when the object is destructed. This makes
- handling temporary memory in a function more robust.
-
- @internal A poor substitute for a real shared pointer copy on write
- class but one step at a time. It's better than doing this by
- hand every time.
-*/
-template <typename T> class xptr {
-public:
- typedef xptr self;
-
- xptr()
- : m_ptr(0)
- { }
-
- /// Construct from allocated memory.
- /// @note @a ptr must refer to memory allocated @c ats_malloc.
- explicit xptr(T* ptr)
- : m_ptr(ptr)
- { }
-
- /// Construct and initialized with memory for @a n instances of @a T.
- explicit xptr(size_t n)
- : m_ptr((T *)ats_malloc(sizeof(T) * n))
- { }
-
- /// Destructor - free memory held by this instance.
- ~xptr()
- {
- ats_free(m_ptr);
- }
-
- /// Assign memory.
- /// @note @a ptr must be allocated via @c ats_malloc.
- self& operator = (T* ptr) {
- ats_free(m_ptr);
- m_ptr = ptr;
- return *this;
- }
-
- /// Auto convert to a raw pointer.
- operator T* () { return m_ptr; }
-
- /// Auto convert to raw pointer.
- operator T const* () const { return m_ptr; }
-
- /// Boolean operator. Returns true if we are pointing to valid memory.
- operator bool() const { return m_ptr != 0; }
-
- /** Release memory from control of this instance.
-
- @note Although direct assignment is forbidden due to the
- non-obvious semantics, a pointer can be moved (@b not copied) from
- one instance to another using this method.
- @code
- new_ptr = old_ptr.release();
- @endcode
- This is by design so any such transfer is always explicit.
- */
- T* release() {
- T* zret = m_ptr;
- m_ptr = 0;
- return zret;
- }
-
-private:
- T* m_ptr; ///< Pointer to allocated memory.
-
- /// Copy constructor - forbidden.
- xptr(self const& that);
-
- /// Self assignment - forbidden.
- self& operator = (self const& that);
-};
-
-
-// Special operators for xptr<char>
-/** Combine two strings as file paths.
- Trailing and leading separators for @a lhs and @a rhs respectively
- are handled to yield exactly one separator.
- @return A newly @x ats_malloc string of the combined paths.
-*/
-inline char*
-path_join (xptr<char> const& lhs, xptr<char> const& rhs)
-{
- size_t ln = strlen(lhs);
- size_t rn = strlen(rhs);
- char const* rptr = rhs; // May need to be modified.
-
- if (ln && lhs[ln-1] == '/') --ln; // drop trailing separator.
- if (rn && *rptr == '/') --rn, ++rptr; // drop leading separator.
-
- char* x = static_cast<char*>(ats_malloc(ln + rn + 2));
-
- memcpy(x, lhs, ln);
- x[ln] = '/';
- memcpy(x + ln + 1, rptr, rn);
- x[ln+rn+1] = 0; // terminate string.
-
- return x;
-}
-
-#endif // c++
+typedef struct Resource Resource;
#endif /* __INK_RESOURCE_H__ */
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/lib/ts/libts.h
----------------------------------------------------------------------
diff --git a/lib/ts/libts.h b/lib/ts/libts.h
index 27c9e92..5fc6dea 100644
--- a/lib/ts/libts.h
+++ b/lib/ts/libts.h
@@ -64,7 +64,6 @@
#include "ink_queue.h"
#include "ink_rand.h"
#include "ink_resolver.h"
-#include "ink_resource.h"
#include "ink_sock.h"
#include "ink_inet.h"
#include "ink_sprintf.h"
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/mgmt/MultiFile.cc
----------------------------------------------------------------------
diff --git a/mgmt/MultiFile.cc b/mgmt/MultiFile.cc
index cbf1b78..07d6060 100644
--- a/mgmt/MultiFile.cc
+++ b/mgmt/MultiFile.cc
@@ -24,7 +24,6 @@
#include "ink_platform.h"
#include "ink_defs.h"
#include "ink_assert.h"
-#include "ink_resource.h"
#include "ink_error.h"
#include "ink_file.h"
#include "ink_string.h"
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/mgmt/api/EventCallback.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/EventCallback.cc b/mgmt/api/EventCallback.cc
index 3222551..b925e98 100644
--- a/mgmt/api/EventCallback.cc
+++ b/mgmt/api/EventCallback.cc
@@ -30,7 +30,6 @@
***************************************************************************/
#include "ink_config.h"
-#include "ink_resource.h"
#include "EventCallback.h"
#include "CoreAPIShared.h"
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/mgmt/api/GenericParser.h
----------------------------------------------------------------------
diff --git a/mgmt/api/GenericParser.h b/mgmt/api/GenericParser.h
index acaf8a5..baa5e9e 100644
--- a/mgmt/api/GenericParser.h
+++ b/mgmt/api/GenericParser.h
@@ -33,7 +33,6 @@
#include "ink_assert.h"
#include "Tokenizer.h"
#include "List.h"
-#include "ink_resource.h"
#include "mgmtapi.h" // INKFileNameT
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/mgmt/utils/ExpandingArray.cc
----------------------------------------------------------------------
diff --git a/mgmt/utils/ExpandingArray.cc b/mgmt/utils/ExpandingArray.cc
index a4b6687..09ba679 100644
--- a/mgmt/utils/ExpandingArray.cc
+++ b/mgmt/utils/ExpandingArray.cc
@@ -22,8 +22,8 @@
*/
#include "ink_platform.h"
+#include "ink_memory.h"
#include "ExpandingArray.h"
-#include "ink_resource.h"
ExpandingArray::ExpandingArray(int initialSize, bool freeContents)
{
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/mgmt/web2/WebHttpMessage.cc
----------------------------------------------------------------------
diff --git a/mgmt/web2/WebHttpMessage.cc b/mgmt/web2/WebHttpMessage.cc
index 3aa3a82..9a7336b 100644
--- a/mgmt/web2/WebHttpMessage.cc
+++ b/mgmt/web2/WebHttpMessage.cc
@@ -23,7 +23,6 @@
#include "ink_platform.h"
#include "ink_defs.h"
-#include "ink_resource.h"
#include "ink_string.h"
#include "ink_time.h"
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/mgmt/web2/WebHttpSession.cc
----------------------------------------------------------------------
diff --git a/mgmt/web2/WebHttpSession.cc b/mgmt/web2/WebHttpSession.cc
index c6518db..c92fbbb 100644
--- a/mgmt/web2/WebHttpSession.cc
+++ b/mgmt/web2/WebHttpSession.cc
@@ -29,7 +29,6 @@
****************************************************************************/
#include "ink_platform.h"
-#include "ink_resource.h"
#include "ink_hash_table.h"
#include "ink_hash_table.h"
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f7aeda9a/proxy/hdrs/HdrToken.h
----------------------------------------------------------------------
diff --git a/proxy/hdrs/HdrToken.h b/proxy/hdrs/HdrToken.h
index ad00004..052753a 100644
--- a/proxy/hdrs/HdrToken.h
+++ b/proxy/hdrs/HdrToken.h
@@ -29,7 +29,6 @@
#include "ink_assert.h"
#include "ink_atomic.h"
#include "ink_defs.h"
-#include "ink_resource.h"
#include "ink_string.h"
#include "Allocator.h"
#include "Regex.h"