On 02/05/2014 13:30, Morten Kvistgaard wrote:
When I build “daemon” applets into Busybox, I’m wondering about the ram usage. (...) But when executing it, the ram usage seems to be [Busybox flash size + local ram allocations]. Meaning that instead of 50k ram, it takes up 350k. Or so my top command reports. Is this true?
Usually, the size reported by top and ps is virtual. It's the amount of virtual address space the binary uses; but in most cases, the real amount of memory the process is using is a lot smaller than that. The kernel uses physical memory page by page, so only the required amount of real memory (in your example, enough to read the "init" applet code and data) is actually used. However, Blackfin processors don't have a real MMU, so I don't think it applies to you. I wouldn't swear it, as I have no experience with noMMU systems, but I think that in your case, the whole binary gets loaded into memory, and is indeed using 350k. I'm not aware of solutions to this - except, maybe, that the Busybox approach of embedding everything into one binary is not suited to noMMU, and you'd be better off with a collection of small binaries, especially for long-lived programs. -- Laurent _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
