You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Leif Hedstrom (JIRA)" <ji...@apache.org> on 2010/11/30 20:10:12 UTC

[jira] Updated: (TS-567) Cleanup of memory allocation in libinktomi++

     [ https://issues.apache.org/jira/browse/TS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-567:
-----------------------------

    Attachment: malloc.txt

Here's a list of some malloc() calls that ought to be fixed / replaced with xmalloc() or ink_malloc(). Unfortunately, doing a similar search for free() is not as easy, since we have many class members named free() that get called frequently. As we change these malloc()'s in various areas, we should look for other use of realloc() and free() that uses the libc allocators directly.

> Cleanup of memory allocation in libinktomi++
> --------------------------------------------
>
>                 Key: TS-567
>                 URL: https://issues.apache.org/jira/browse/TS-567
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Leif Hedstrom
>            Priority: Minor
>             Fix For: 2.1.6
>
>         Attachments: malloc.txt
>
>
> There's a lot of ifdef's and debugging code paths around various allocation schemes in libinktomi++. We should clean this up, and simplify. It'd also be great to make it easy to enable various other allocators, e.g. jemalloc or tcmalloc, as part of the build system, causing ink_malloc / xmalloc and STL containers to use the new allocator. In particular for STL containers, it means we might need to have some allocator setup / initialization?
> Also, when should we use ink_malloc() vs xmalloc() ? It's quite inconsistently used right now I think. And, there are a few places using malloc() (etc.) directly, which we ought to fix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.