Problem using Region Manager with very small segments
Joel Sherrill
joel.sherrill at OARcorp.com
Thu Jul 3 12:45:57 UTC 2008
Please send me some (simple) code that reproduces this and I
will look into it.
--joel
Fabrício de Novaes Kucinskis wrote:
> 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
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list