[Top][All Lists]

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

Re: [avr-libc-dev] malloc bug ?

From: daniel_laptop
Subject: Re: [avr-libc-dev] malloc bug ?
Date: Tue, 10 Sep 2002 00:47:10 +1200

Joerg Wunsch wrote:

> As daniel_laptop wrote:
> > My question is, is __heap_start used in anything other than malloc.c
> Nope, __heap_start and __heap_end are just there so the application
> can tune where malloc() is going to allocate the dynamic memory.

GOOD that means my file all works.

> > Will att. file work for all avr-libc functions (only changing
> > __malloc_heap_start)
> I would do it using linker directives (--defsym), this saves you from
> the trouble of doing it at run-time.  Apart from that, at a first
> glance, it looks OK.  Just give it a try and see if it works.

I had/have tested it with malloc and it works :-) my concern was with
other functions that might (but don't) use __heap_start

using "--defsym __heap_start=0x800200" does work
but i don't know how to set it to a link time target like __bss_end
(in my file "__malloc_heap_start = &__bss_end;")

If there is a way (without modifying linker scripts) please let me know ?

Thank you
Daniel Mooney

PS as per your next email the orig. malloc problem i was having was that
malloc never ran out of memory unless __heap_end was manually set ;-)

reply via email to

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