[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: typedef void * (*lua_Alloc) caching
- From: Javier Guerra Giraldez <javier@...>
- Date: Tue, 5 Apr 2011 09:45:39 -0500
On Tue, Apr 5, 2011 at 9:01 AM, C++ RTMP Server <crtmpserver@gmail.com> wrote:
> Standard allocators are written with multi-thread in mind (locks/mutexes/semaphores are used). You can have single-threaded mempool which is much much faster.
modern allocators usually have both a single threaded version and the
multithreaded version uses a per-thread front pool.
> Also, the tests shown and the ones made by me clearly underlines that with mempool is faster than without it. Much faster!
>> Mempool is just another mem allocator, isn't it? Or rather just one of approaches used by mem allocators. For example, http://goog-perftools.sourceforge.net/doc/tcmalloc.html basically uses this approach as I understand.
> I'm not a big expert, but it looks like it. All I did is to create real-world scenarios using my particular env and saw that is working faster. Also confirmed by the first link I gave here
try again with another allocator:
tcmalloc: http://goog-perftools.sourceforge.net/doc/tcmalloc.html
dlmalloc: http://g.oswego.edu/dl/html/malloc.html
TLSF (rtmalloc) : http://rtportal.upv.es/rtmalloc/
Hoard: http://www.hoard.org/
tcmalloc in particular is a well-supported alternative on many small
and medium systems.
if you get to beat those, then congratulations! write a paper and get
some recognition. seriously; this is a hot area of research, and
there's still improvement to be made
some interesting texts to read:
http://www.slideshare.net/emery/composing-highperformance-memory-allocators-with-heap-layers
http://web.ics.purdue.edu/~zhao54/gcimpl/files/report.pdf
--
Javier