Andrey
Ah... the first line is actually
if (word_707a < (word_7082 + (size = (size + 1) & 0xFFFE)))
Let us look at
size = (size + 1) &0xfffe
what this is doing is making size even: say, size is 13, 13 + 1 is 14 and 14 & 0xfffe is still 14. Say size is 14, 14 + 1 is 15, 15 & 0xfffe
is 14. So, size ends up being either size or the next higher even number. We then make sure the allocation fits into the already
allocated space. If it does we end up at st = word_7082. If not, we use sbrk() to add more memory,
How important? The code just ensures integer (16 bit) addressing -- so the least significant bit should always be zero on
allocated addresses.. may be important elsewhere (even+even = even -- but note that if address is odd, odd+even is odd --
if size is always even, the least significant bit will never change).
FredW