You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Sudheer Vinukonda (JIRA)" <ji...@apache.org> on 2014/12/26 07:54:13 UTC

[jira] [Created] (TS-3264) incorrect usage of iobuf index as iobuf size resulting in not using free list memory

Sudheer Vinukonda created TS-3264:
-------------------------------------

             Summary: incorrect usage of iobuf index as iobuf size resulting in not using free list memory
                 Key: TS-3264
                 URL: https://issues.apache.org/jira/browse/TS-3264
             Project: Traffic Server
          Issue Type: Bug
          Components: HTTP, Logging
            Reporter: Sudheer Vinukonda


{{max_iobuffer_size}} refers to the iobuffer index, which is a bit misleading. Noticed a couple of places (see below) where this is used as the size, instead of index, leading to not use iobuffers for memory allocation.

{code}
      if (s->internal_msg_buffer_size <= max_iobuffer_size) {
        s->internal_msg_buffer_fast_allocator_size = buffer_size_to_index(s->internal_msg_buffer_size);
        s->internal_msg_buffer = (char *) ioBufAllocator[s->internal_msg_buffer_fast_allocator_size].alloc_void();
      } else {
        s->internal_msg_buffer_fast_allocator_size = -1;
        s->internal_msg_buffer = (char *)ats_malloc(s->internal_msg_buffer_size);
      }
{code}

https://github.com/apache/trafficserver/blob/master/proxy/http/HttpTransact.cc#L5364

https://github.com/apache/trafficserver/blob/master/proxy/logging/LogBuffer.cc#L139

https://github.com/apache/trafficserver/blob/master/proxy/logging/LogCollationHostSM.cc#L464





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)