avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] #bug 27235 issue 2


From: Toan Pham
Subject: Re: [avr-libc-dev] #bug 27235 issue 2
Date: Wed, 6 Jan 2010 00:49:04 -0500

I always thought the heap grows from lower address to higher address, and
the stack grows in reverse order, from up most address (end of ram) to lower
address.  That's what is explained in many documentation i've read.

On Wed, Jan 6, 2010 at 12:25 AM, Boyapati, Anitha <address@hidden
> wrote:

>
> (Referring to https://savannah.nongnu.org/bugs/?27235)
>
> Do we have an English version of the page referred in the bug report?
> http://www.mikrocontroller.net/topic/147150 (The site embdev.net has a
> different forum)
>
> Specifically, I am trying to understand 2nd issue reported here.
>
> [quote]
>
> 2. If there is RAM for the Heap, which has been allocated and freed before,
> the next allocating goes from upper to lower addresses. This will IMHO be
> bad for realloc calls, because the memory behind will most likely be used,
> resulting in gaps if the memory size decreases and memory copies if
> increased."
>
> [/quote]
>
> How does allocation happen from upper to lower addresses? From what I
> understand, malloc resorts to heap expansion using __brkval which is the
> largest address not allocated so far. Thus it appears that allocation in a
> heap happens from lower to upper address.
>
> Let me know if I got something wrong.
>
>
> Anitha
>
>
>
>
>
> _______________________________________________
> AVR-libc-dev mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/avr-libc-dev
>


reply via email to

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