grub-devel
[Top][All Lists]
Advanced

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

Re: network support : memory management problem


From: Vincent Guffens
Subject: Re: network support : memory management problem
Date: Mon, 06 Jun 2005 12:03:42 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913

Marco Gerards wrote:
Vincent Guffens <address@hidden> writes:


it looks like the problem is gone. I changed the way I allocate the
memory to hold a block. I changed from:

int load_block ()
        char * p = (char *) grub_malloc(len*sizeof(char));

to

int load_block ()
        char * p;
[...]
p = (char *) grub_malloc(len*sizeof(char));


This code is just the same.  I think the problem is still there but
just does not show up anymore.  I have seen a similar error before,
but I did not have the time to debug it.

Indead the problem is still there. It is now possible to do something like:

        grub> ifconfig
        [...]
        grub> loopback lo (nd)tfile
        [...]
        grub> ls (lo)/
        [...]
        grub> cat (lo)/file.txt
        [...]
        

I have tested three different card: Tulip, e1000, nforce2 as well as three compilers: gcc-2.95, gcc-3.0, gcc-3.3 However, the memory problem is still there, and I have no idea where it comes from. It varies depending on the compiler, the optimization flag, and some very small changes in the code. But it is always possible to find one combination of these for which the problem appears after loading a linux kernel or after the command boot or after a cat of a text file in the loopback device.



--
                                Vincent Guffens
                                PhD Student UCL/CESAME
                                tel:   +32 10 47 80 30
Value your freedom, or you will lose it, teaches history.
"Don't bother us with politics," respond those who don't want to learn.
                -- Richard M. Stallman




reply via email to

[Prev in Thread] Current Thread [Next in Thread]