_Heap_Allocate_aligned return the same address?
joel.sherrill at oarcorp.com
Wed Sep 12 20:17:06 UTC 2007
Sergei Organov wrote:
> "阎淼" <yanmiaobest at gmail.com> writes:
>> I am using rtems-4.7.1 on i386-qemu, I called
>> _Heap_Allocate_aligned twice, but the return address are the same.
>> here is my code:
>> char buf[4096 * 10];
>> #define PAGE_SIZE 4096
>> void f()
>> Heap_Control the_heap;
>> _Heap_Initialize( &the_heap, (void *)buf, 4096 * 10, CPU_ALIGNMENT);
>> void *p = _Heap_Allocate_aligned( &the_heap, 4096, PAGE_SIZE);
>> void *g = _Heap_Allocate_aligned( &the_heap, 4096, PAGE_SIZE);
>> printf("0x%x\n", p );
>> printf("0x%x\n", g );
>> and the output is:
>> is somthing wrong here?
> I've created a new PR1258 for this issue:
And you attached a PR. I committed it to the 4.7 branch and CVS head.
For those in the back row, it does not apply to the 4.6 branch since that
had different heap code.
> -- Sergei.
> rtems-users mailing list
> rtems-users at rtems.com
More information about the users