RTEMS 4.0.0 bug? LIBC_HEAP_SIZE

Alexander D. Tarkhov karabass at mitino.ptt.ru
Thu Nov 16 13:48:12 UTC 2000


Hello, rtems users,

I found a strange call to bsp_libc_init() in 
bsp_start() function for my bsp.
We use bsp "p4000", target "mips64orion".
So the code is located in 
tools/rtems-4.0.0/c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c

It goes as follows:
  BSP_Configuration.work_space_start =
       (void *)((unsigned64)((&end) + LIBC_HEAP_SIZE + 0x2000) & ~0x7);

Seems to me that it may cause an error, if LIBC_HEAP_SIZE is the
required size of the heap in bytes. How does the compiler treat such
expressions,
as pointer arythmetics, or as normal integer?

In any case I am going to test the following:
  BSP_Configuration.work_space_start =
       (void *)((unsigned64)(((int)(&end)) + LIBC_HEAP_SIZE + 0x2000) &
~0x7);

Does that seem reasonable?
And what is a strange constant 0x2000?

I understand that few people (if any) are interested in such errors,
and that BSP is my own problem. Still let it just lay in the archives :)
Thank you for your comments.

Best regards,
Alexander Tarkhov



More information about the users mailing list