#4864 closed defect (invalid)
Still not the right value in 11701 after accidental remove fix.
Reported by: | Bust3D | Owned by: | |
---|---|---|---|
Priority: | Please fill in | Component: | ! Please select... |
Severity: | Please fill in | Keywords: | |
Cc: | Sensitive: | no |
Description
Revision
11701
Issue Description
This was before accidental cosmetics remove !
(((OSCAM_STACK_MIN) / pagesize) + 1) * pagesize;
and this is now in 11701:
oscam_stacksize = ((OSCAM_STACK_MIN) / pagesize + 1) * pagesize;
Result
(((OSCAM_STACK_MIN) / pagesize) + 1) * pagesize; will never equals to oscam_stacksize = ((OSCAM_STACK_MIN) / pagesize + 1) * pagesize;
(8 / 4) + 1 * 1
(8 / 4+1) * 1 ===> actual in 11701 will add one plus to pagesize and divide wrong then and will be not the same size as was before accidental remove.
This is the right value.
(((OSCAM_STACK_MIN) / pagesize) + 1) * pagesize;
Simple Math.
Change History (5)
comment:3 by , 2 years ago
For example with
OSCAM_STACK_MIN equal to 64000 + 32768
pagesize equal to 10
we have
with 11699:
oscam_stacksize = (((OSCAM_STACK_MIN) / pagesize) + 1) * pagesize
(((64000 + 32768 ) / 10) + 1) * 10
(((96768 ) / 10) + 1) * 10
(( 96768 / 10) + 1) * 10
(( 9676 ) + 1) * 10
(( 9676 + 1) * 10
( 9677 ) * 10
9677 * 10
96770
with 11701
oscam_stacksize = ((OSCAM_STACK_MIN) / pagesize + 1) * pagesize
((64000 + 32768 ) / 10 + 1) * 10
((96768 ) / 10 + 1) * 10
( 96768 / 10 + 1) * 10
( 9676 + 1) * 10
( 9677 ) * 10
9677 * 10
96770
comment:4 by , 2 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
You have right !
int main()
{
printf("%d\n", ( (((64000 + 32768 ) / 10) + 1) * 10) );
printf("%d\n", ( ((64000 + 32768 ) / 10 + 1) * 10) );
}
has same result!
Thanks for math lesson :)
Result
;