- 
    Enhancement 
- 
    Resolution: Fixed
- 
     P4 P4
- 
    18
- 
        b08
                    This is only a problem on 32 bit platforms, but this code has been like this for forever so we don't know why it works.
From [~stuefe]:
I'm not sure the alignment handling is correct. Either that or I don't understand the contract of the Amalloc... functions.
I thought:
Amalloc(x) -> allocate x bytes, align returned pointer to 64bit
AmallocWords(x) -> allocate x bytes, align returned pointer to pointer size
?
Because the functions just align the given byte size (well, Amalloc() aligns automatically, AmallocWords() asserts). But that has no effect on the returned pointer.
Consider this sequence, on 32bit:
AmallocWords(4) -> _hwm = 4
Amalloc(8) -> will return a pointer to offset 4, so not 64bit aligned.
From [~stuefe]:
I'm not sure the alignment handling is correct. Either that or I don't understand the contract of the Amalloc... functions.
I thought:
Amalloc(x) -> allocate x bytes, align returned pointer to 64bit
AmallocWords(x) -> allocate x bytes, align returned pointer to pointer size
?
Because the functions just align the given byte size (well, Amalloc() aligns automatically, AmallocWords() asserts). But that has no effect on the returned pointer.
Consider this sequence, on 32bit:
AmallocWords(4) -> _hwm = 4
Amalloc(8) -> will return a pointer to offset 4, so not 64bit aligned.
- relates to
- 
                    JDK-8270179 Rename Amalloc_4 -           
- Resolved
 
-         
- 
                    JDK-8271242 Add Arena regression tests -           
- Resolved
 
-         
 
        