[ECOS] kernel tests memvar1 and kmemvar1
Chris Morrow
cmorrow@YottaYotta.com
Wed Nov 8 14:18:00 GMT 2000
Both of the kernel tests memvar1 and kmemvar1 have a routine
static void check_in_mp0(cyg_uint8 *p, cyg_int32 size)
{
CYG_TEST_CHECK(NULL != p,
"Allocation failed");
CYG_TEST_CHECK(mem[0] <= p && p+size < mem[1],
"Block outside memory pool");
}
I believe the second test should be
CYG_TEST_CHECK(mem[0] <= p && p+size <= mem[1],
"Block outside memory pool");
The upper bound should allow the equal case, or
perhaps even better
CYG_TEST_CHECK(mem[0] <= p && p[size - 1] < mem[1],
"Block outside memory pool");
--
Chris Morrow YottaYotta Inc.
email: cmorrow@yottayotta.com
phone: (780) 439 9000 ext 227
web: http://www.yottayotta.com
More information about the Ecos-discuss
mailing list