[Newlib] Bug with malloc_r()

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: [Newlib] Bug with malloc_r()

Post by JamesM »

bluemoon wrote:
blanham wrote:I noticed that in some cases ph_virtaddr wasn't on a page boundary
That sound strange, I never saw that. Did you put align for every section in the linker script? Can you confirm there is nothing on SHT_RELA?
I am interested to know why, since the same problem may also arise in mine kernel.
There's no reason why a user application should have its segments aligned to page boundaries.
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: [Newlib] Bug with malloc_r()

Post by bluemoon »

I see, thanks.

To support that scenario I simply align/adjust ph_virtaddr/size before passing to alloc/mapping the memory. blanham may try this as well.
Post Reply