Problem using Region Manager with very small segments

Fabrício de Novaes Kucinskis fabricio at dea.inpe.br
Wed Jul 2 18:34:09 UTC 2008


Hello all,


I have an ERC32 application, in which I create a Region with length = 512
bytes and page_size = 8 bytes.

The RTEMS User Manual says that the page_size shall be a multiple of four
greater or equal four, but if I try to create a region with page_size = 4 I
got a "RTEMS_INVALID_PAGE_SIZE" error. Using page_size = 8 there is no error
but, when I ask for a segment of, say, 5 bytes, I got a 12 byte-segment, and
not a 8 byte-segment, as would be expected.

Furthermore, I'm having a weird problem, and that's the main reason for this
call for help: normally I ask for segments of 2 to 16 bytes. The application
seems to work properly, but sometimes I got a RTEMS_INVALID_SIZE error (do
not confuse with RTEMS_UNSATISFIED). 

The strange thing here is that I got this error when asking for a three-byte
segment, when only two segments of no more than 24 bytes are allocated.
RTEMS_INVALID_SIZE should occur only when the size of the segment is zero or
greater than the maximum segment possible, which is not the case.

I checked, and my application doesn't write outside the segments boundaries,
so I don't think the region is corrupted. Could be then some problem with
the segment's overhead? The manual states that there is an overhead for each
segment, but it lacks information about the size of such overhead. I know it
is not possible to calculate the number of bytes available in a region, but
what is the overhead per segment?

Any help or additional information will be greatly appreciated.
Thanks in advance and best regards,


Fabrício de Novaes Kucinskis - DEA / INPE
-----------------------------------------------
Onboard Data Handling Group - SUBORD
Aerospace Electronics Division
Brazilian National Institute for Space Research




More information about the users mailing list