You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clearly the VM is off by a byte. No memory range is going to be from 0x0 to 0x00100000 kB. The range would be 0x0 to 0x000FFFFF.
The above math attempts to convert an ending address in kB to an ending address in bytes. After a multiply by 1024 the 0x3FF is an attempt to fill the bits to the right. In a normal case we would have:
0x000FFFFF kB becomes 3FFFFC00 bytes. Add 0x3FF and you get 0x3FFFFFFF.
A solution that would avoid the odd look (granted, yes this would never have happened if the VM calculated correctly) and more to the intent would be to detect if the last bit is a 1 (an odd number) and IIF, then add the 0x3FF.
The text was updated successfully, but these errors were encountered:
The above math results in an awkward looking value on an Azure VM:
Clearly the VM is off by a byte. No memory range is going to be from 0x0 to 0x00100000 kB. The range would be 0x0 to 0x000FFFFF.
The above math attempts to convert an ending address in kB to an ending address in bytes. After a multiply by 1024 the 0x3FF is an attempt to fill the bits to the right. In a normal case we would have:
0x000FFFFF kB becomes 3FFFFC00 bytes. Add 0x3FF and you get 0x3FFFFFFF.
A solution that would avoid the odd look (granted, yes this would never have happened if the VM calculated correctly) and more to the intent would be to detect if the last bit is a 1 (an odd number) and IIF, then add the 0x3FF.
The text was updated successfully, but these errors were encountered: