[BusyBox] Re: busybox init memory problems

bug1 bug1 at netconnect.com.au
Fri Jun 2 12:54:24 UTC 2000


bug1 wrote:
> 
> Erik Andersen wrote:
> >
> > On Thu Jun 01, 2000 at 05:30:41AM +1000, bug1 wrote:
> > > When i try and use busybox (0.44pre) init during boot i get a message
> > > "Sorry, your computer does not have enough memory"
> > >
> > > I tried to do a bit of debugging, i put a line in displaying how much
> > > memory it detected just before it goes into the endless loop, it detects
> > > 31 (i assume KB) of memmory, i have 128MB.
> > >
> > > Im trying to use 2.4.0-test1 with it, is this a known problem ?
> >
> > Hmm.  That is wierd.  I have not yet tried it with 2.4.x yet (I have tried it
> > with the pre series and made a few minor adjustments to accomodate the kernel
> > changes).  The mechanism I use to detect memory is sysinfo(2).  I wonder if
> > that has broken in the recent kernels?  If you comment out the memory check
> > completely, does the boot process complete?  What does busybox free show and
> > what does 'cat /proc/meminfo' show after booting?
> >
> >  -Erik
> >
> > --
> > Erik B. Andersen   email:  andersen at lineo.com
> > --This message was written using 73% post-consumer electrons--
> 
> I comment out the memmory check part and it continues ok.
> 
> busybox free shows only 7 free, /proc/meminfo shows the correct ammount.
> 
> I could be doing something wrong, ill download the cvs version of
> busybox and have a go with a clean copy.
> 
> Glenn
> 
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/mailman/listinfo/busybox

The sysinfo struct has changed going to 2.[34], whats the best way to
fix this ?

from 2.4.0-test1-ac7 /include/linux/kernel.h 
struct sysinfo {
        long uptime;                    /* Seconds since boot */
        unsigned long loads[3];         /* 1, 5, and 15 minute load
averages */
        unsigned long totalram;         /* Total usable main memory size
*/
        unsigned long freeram;          /* Available memory size */
        unsigned long sharedram;        /* Amount of shared memory */
        unsigned long bufferram;        /* Memory used by buffers */
        unsigned long totalswap;        /* Total swap space size */
        unsigned long freeswap;         /* swap space still available */
        unsigned short procs;           /* Number of current processes
*/
        unsigned long totalhigh;        /* Total high memory size */
        unsigned long freehigh;         /* Available high memory size */
        unsigned int mem_unit;          /* Memory unit size in bytes */
        char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses
this.. */};

from same file in 2.2.16-pre7
struct sysinfo {
        long uptime;                    /* Seconds since boot */
        unsigned long loads[3];         /* 1, 5, and 15 minute load
averages */
        unsigned long totalram;         /* Total usable main memory size
*/
        unsigned long freeram;          /* Available memory size */
        unsigned long sharedram;        /* Amount of shared memory */
        unsigned long bufferram;        /* Memory used by buffers */
        unsigned long totalswap;        /* Total swap space size */
        unsigned long freeswap;         /* swap space still available */
        unsigned short procs;           /* Number of current processes
*/
        char _f[22];                    /* Pads structure to 64 bytes */
};





More information about the busybox mailing list