mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-18 19:25:49 +00:00
ICU-597 Modified the calculation for U_MAX_PTR incorrectly.
X-SVN-Rev: 3989
This commit is contained in:
parent
3baefcb12a
commit
19b4867af3
1 changed files with 6 additions and 6 deletions
|
@ -101,14 +101,14 @@ With the provided macro we should never be out of range of a given segment
|
|||
and 3 bytes for the offset. The key is that the casting takes care of only
|
||||
retrieving the offset portion minus x1000. Hence, the smallest offset seen in
|
||||
a program is x001000 and when casted to an int would be 0. That's why we can
|
||||
only add 0xffefff. Otherwise, we would exceed the segment. Yes, 16M is the
|
||||
magic limitation we in AS/400-land have been previously limited to. But now
|
||||
we have teraspace storage. Currently this will support up to 2G. I did not
|
||||
take the time to provide this additional check (what kind of pointer and then
|
||||
different calculation).
|
||||
only add 0xffefff. Otherwise, we would exceed the segment.
|
||||
|
||||
Currently, 16MB is the current addressing limitation on as/400. This macro
|
||||
may eventually be changed to use 2GB addressability for the newer version of
|
||||
as/400 machines.
|
||||
*/
|
||||
#ifndef U_MAX_PTR
|
||||
#define U_MAX_PTR(ptr) ((void*)(((void*)ptr)-((int32_t)(ptr))+((int32_t)0xffefff)))
|
||||
#define U_MAX_PTR(ptr) ((void*)(((char*)ptr)-((int32_t)(ptr))+((int32_t)0xffefff)))
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
|
|
Loading…
Add table
Reference in a new issue