linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* glibc........ memory limitations.... ideas?
@ 1999-10-20 15:16 kd
  1999-10-20 19:18 ` Dan Malek
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: kd @ 1999-10-20 15:16 UTC (permalink / raw)
  To: linuxppc-embedded


Hi,

I have a small question...

We are developing an embedded solution as most of the people here on the
list. This means that we (or at least I) are limited be the amount of
available memory in the units.
We for example are limited by a 2 MB flash chip that might someday be 4MB.
In maybe 1.2MB of this chip I can stuff applications that need to run on
the device.
A statically linked application (with glibc) is arround 300KB (250KB
-450KB).  which means that I can stuff maybe 3-4 statically linked
applications in the flash.

The othre option is to link the applications dinamically to glibc and
stdlibc++. libc-2.1.1.so is around 4 MB and stdlibc++ is around 2.5 MB. So
using dinamically linked
applications  is not even a possibility when you look at it. BTW : Why are
thes libraries so huge!?

Compressed filesystems is one option but that means we have to increase the
size of the DRAM and that again means increased current drain. Limited
battery resources is
one of our contraints also.

How do you guys cram all the software you want into so small space? Are
there any othre c and c++ libraries that are smaller but provides access to
threads (pthreads) and
work with linux?

Thanks, for all inputs.

K.D.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: glibc........ memory limitations.... ideas?
@ 1999-10-21 11:29 kd
  0 siblings, 0 replies; 5+ messages in thread
From: kd @ 1999-10-21 11:29 UTC (permalink / raw)
  To: linuxppc-embedded



Hi,

I am no expert but DRAM takes a lot of current when you access it. And I
suspect that if you double the memory size the refresh cycle current is
approx doubled.
So if you have the fs also in DRAM you essentially make memory accesses
more frequently and therfore you draw more current.

I made a quick measurement on the 4MB simm, no parity, 5V  I have in my
board and it looks like the DRAM is drawing something like 10mA just in
refresh cycle (no memory accesses).
When the kernel has booted it is drawing close to 110mA. And as I
understand from the HW-engeneers 100mA is alot!! 8-)

I suspect that it is possible to "strip down" glibc. But I have no Idea how
much work that is.

Has anyone any experience with NewLib? Do you think it is easy to mix
pthread or LinuxThreads and NewLib and stdlibc++?
K.D.



                                                                                                                                                    
                    Dan Malek <dan@netx4.com>                                                                                                       
                    Sent by:                                To:     kd@flaga.is                                                                     
                    owner-linuxppc-embedded@lists.li        cc:     linuxppc-embedded@lists.linuxppc.org                                            
                    nuxppc.org                              Subject:     Re: glibc........ memory limitations.... ideas?                            
                                                                                                                                                    
                                                                                                                                                    
                    10/20/99 07:18 PM                                                                                                               
                                                                                                                                                    
                                                                                                                                                    





kd@flaga.is wrote:


> Compressed filesystems is one option but that means we have to increase
the
> size of the DRAM and that again means increased current drain. Limited
> battery resources is
> one of our contraints also.

Just because I need to learn something today, does memory really take
that much power?


> How do you guys cram all the software you want into so small space?

I am still using the old R4 libc-1.99 and associated libararies
for this reason.

One of the differences is that glibc2 just simply has more stuff
in it, which was contained in separate libraries of the past.  If
you want lots of the workstation features in your embedded system,
you will still end up with lots of library space used.

> ... Are
> there any othre c and c++ libraries that are smaller but provides access
to
> threads (pthreads) and
> work with linux?


Here again, I am a minimalist.  I don't use pthreads, as the
implementation is very heavyweight.  I just use Linux threads and
some simple atomic operations for synchronization.  I certainly
don't use C++ in a resource constrained embedded environment.
All of my embedded applications have used compressed ram disks
in Flash rom....It doesn't take long before you have an application
that needs a temporary file of some kind.


     -- Dan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-10-21 13:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-10-20 15:16 glibc........ memory limitations.... ideas? kd
1999-10-20 19:18 ` Dan Malek
1999-10-21  3:22 ` Graham Stoney
1999-10-21 13:50 ` Epicom
  -- strict thread matches above, loose matches on Subject: below --
1999-10-21 11:29 kd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).