lua-users home
lua-l archive

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

Hi Mike,
Thank you. Can lua be compiled with uclibc?


----- Original Message ----- 
From: "Mike Pall" <>
To: "Lua list" <>
Sent: Wednesday, November 15, 2006 9:57 AM
Subject: Re: Lua need 1M memory?

> Hi,
> jason zhang wrote:
>> I think the overhead for shared library is "vmLib". "vmRSS"
>> means the physical memory the process is using.
>> Am I right?
> Well, RSS counts shared and non-shared pages ... There is no
> single, definitive indicator for the "memory use of a process" in
> a modern OS with a complex virtual memory subsystem.
> A somewhat related read:
>> The simplest hello world C program use about 300K RSS memory.
>> Others memory is for C runtime library. While Lua interpreter
>> use 1M RSS memory.
> Try:
>  ldd `which lua`
> You may discover that Lua is linked with libreadline which drags
> in quite a few other libraries. Don't forget about libm and
> libdl, too. This and the fact that Lua initialization calls a
> handful libc functions explains the difference. The latter adds
> quite a few (shared) pages of libc to the RSS. The main memory
> hogs are probably the libc memory allocator and stdio. Don't
> blame this on Lua ...
> Thankfully Lua allows you to drop most of these dependencies (if
> you really need to). But I wouldn't bother on a desktop class
> machine, because most of it is already in memory, anyway.
> Bye,
>     Mike