NOMMU: stack versus malloc?

Mike Frysinger vapier at gentoo.org
Tue Oct 9 11:56:49 PDT 2007


On Tuesday 09 October 2007, Denys Vlasenko wrote:
> A question to people who work with NOMMU machines:
>
> Obviously, having small stack usage is important for
> small, NOMMU machines.
>
> However, after a certain point you cannot just eliminate
> stack usage, you must move it to other storage.
>
> For example, lineedit.c currently eats 12k+ if stack.
>
> I can convert it into malloc use.
>
> Question: is it better or actually worse?
> Line editing is invoked repeatedly, and repeated malloc/free
> of random-sized blocks can increase fragmentation
> -> increase memory consumption.

it really depends on the size of the consumption ... on nommu, the default 
stack is 4k, so i'd say if you're talking about more than 1k, it should be a 
malloc ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://busybox.net/lists/busybox/attachments/20071009/997a25ae/attachment.pgp 


More information about the busybox mailing list