You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Leif Hedstrom <zw...@apache.org> on 2013/06/18 18:48:11 UTC

Re: git commit: TS-1684 - Added more ProxyAllocators for faster and local memory allocation. Have seen a doubling in performance depending on the benchmark. Details in the ticket.

On 6/17/13 3:13 PM, bcall@apache.org wrote:
> Updated Branches:
>    refs/heads/master 1cc22d69f -> 052da6724
>
>
> TS-1684 - Added more ProxyAllocators for faster and local memory
> allocation.  Have seen a doubling in performance depending on the benchmark.
> Details in the ticket.

Two things:

1) I added in the missing ProxyAllocator.cc file from the source code. I 
don't know if that's what the intent was, cause we have the templates 
(and see 2).

2) It seems one of the templates in I_ProxyAllocator.h isn't used any 
more? See patch below, do we need that?

Cheers,

-- Leif

diff --git a/iocore/eventsystem/I_ProxyAllocator.h b/iocore/eventsystem/I_ProxyAllocator.h
index a221d63..c578f7d 100644
--- a/iocore/eventsystem/I_ProxyAllocator.h
+++ b/iocore/eventsystem/I_ProxyAllocator.h
@@ -69,18 +69,6 @@ template<class C> inline C * thread_alloc_init(ClassAllocator<C> &a, ProxyAlloca
    return a.alloc();
  }

-template<class C> inline void
-thread_freeup(ClassAllocator<C> &a, ProxyAllocator & l)
-{
-  while (l.freelist) {
-    C *v = (C *) l.freelist;
-    l.freelist = *(C **) l.freelist;
-    l.allocated--;
-    a.free(v);                  // we could use a bulk free here
-  }
-  ink_assert(!l.allocated);
-}
-
  void* thread_alloc(Allocator &a, ProxyAllocator &l);
  void thread_freeup(Allocator &a, ProxyAllocator &l);