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

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

Re: [avr-libc-dev] malloc changes


From: DarkDragon
Subject: Re: [avr-libc-dev] malloc changes
Date: Thu, 9 Apr 2009 21:59:26 -0700 (PDT)

Found the source to malloc and it looks like the cause is the following code
inserted in AVR LibC 1.6.5:

if (cp <= __brkval)
 /*
  * Memory exhausted.
  */
 return 0;

If I read this correctly, since the AVRX task stack is under __brkval,
malloc won't work if called from a task.

Maybe I can put a wrapper around malloc to repoint the stack pointer so that
this line is valid:
cp = STACK_POINTER() - __malloc_margin;

-- 
View this message in context: 
http://www.nabble.com/malloc-changes-tp22982993p22983132.html
Sent from the AVR - Libc - Dev mailing list archive at Nabble.com.





reply via email to

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