lua-users home
lua-l archive

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


I agree with Luiz.

This test case with Android and phone seems to be good.

Other test cases are different, and the latest implementations of
malloc / realloc are good ( see nedmalloc / ptmalloc3 / hoard ).

Moreover
 - for many applications running, take memory and don't release it is
a nightmare. One application runs better, the other apps suffer the
shortage.

- I fear Lua becoming like Python, a "pac-man" for your memory.
And release memory a lot after its "mallocs" is not so easy.
Complex garbage collectors have still many troubles regarding
refcount, memory leaks, and so on.


ciao, Massimo



On 3 April 2011 20:37, C++ RTMP Server <crtmpserver@gmail.com> wrote:
> Table 7: Real Scenario Test
>        new/delete      static_mem_pool (default)       static_mem_pool (thread-specific)
> Linux GCC 3.2.21        5.87    0.84    0.83
> Linux GCC 3.4.21        5.91    2.61    0.77
> Linux GCC 3.2.22        12.82   8.77    0.84
> Linux GCC 3.4.22        12.73   8.45    0.76
>
>
> http://wyw.dcweb.cn/static_mem_pool.htm
>
> The improvements are quite significant. Especially in single-threaded envs.
>
> On Apr 3, 2011, at 9:31 PM, Luiz Henrique de Figueiredo wrote:
>
>>> Is it worth implementing a nice caching mechanism for doing allocations inside lua_Alloc function?
>>
>> I think the accepted wisdom is to avoid trying to outsmart malloc.
>>
>>> I've done some synthetic tests, and it looks like there is a lot of improvements especially when working with android on a phone.
>>
>> Perhaps use a better malloc from the start then?
>>
>
> ------
> Eugen-Andrei Gavriloaie
> Web: http://www.rtmpd.com
>
>
>