pjsip-perf memory size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 9, 2008 at 2:34 PM, Benny Prijono <bennylp at pjsip.org> wrote:

> Borrowing C++ terms, pool factory is an abstract base class, and the
> caching pool is one of the implementation class, derived from it. To create
> a pool factory that doesn't allocate dynamic memory, you'd need to "derive"
> a "class" from pool factory, and use this as the pool factory for the
> application (instead of the caching pool).
>
>
Ah, looking at pool.h again it seems that the solution is easier than that.
Rather than implementing another pool factory class, you can also set the
"policy" argument when creating the caching pool (normally this argument is
NULL). The policy controls how memory is allocated/freed from/to the OS, and
you can supply your own policy that allocates memory chunks from a
preallocated block.

Cheers
 Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20081009/f9ba6c31/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux