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

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

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


From: Theodore A. Roth
Subject: Re: [avr-libc-dev] malloc bug ?
Date: Sun, 8 Sep 2002 12:35:07 -0700 (PDT)

On Sun, 8 Sep 2002, Joerg Wunsch wrote:

:)As daniel_laptop wrote:
:)
:)> Can someone with more experence confirm if I am right ?
:)> 
:)> in libc/stdlib/malloc.c
:)> the line
:)> 
:)> #define STACK_POINTER() (*(volatile unsigned int *)0x3d)
:)> 
:)> should this be
:)> 
:)> #define STACK_POINTER() (*(volatile unsigned int *)0x5d)
:)
:)I think you're right.  Instead, we should probably just include
:)<avr/io.h>, and use (char *)SP instead.

This seems to be the correct thing to do. Avoid those magic numbers. ;-)

Ted Roth





reply via email to

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