RFR: 8245002: Windows GDI functions don't support NUMA interleaving
Stefan Karlsson
stefan.karlsson at oracle.com
Tue May 19 14:04:43 UTC 2020
On 2020-05-19 14:23, Thomas Schatzl wrote:
> Hi,
>
> On 19.05.20 13:53, Stefan Karlsson wrote:
>> Updated webrevs:
>> https://cr.openjdk.java.net/~stefank/8245002/webrev.02.workaround.kims-review
>>
>> https://cr.openjdk.java.net/~stefank/8245002/webrev.all.kims-review
>
> - s/adjecent/adjacent
Fixed.
>
> - From CreateBitmap documentation
> (https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-createbitmap):
>
>
> "A pointer to an array of color data used to set the colors in a
> rectangle of pixels. Each scan line in the rectangle must be word
> aligned (scan lines that are not word aligned must be padded with
> zeros). If this parameter is NULL, the contents of the new bitmap is
> undefined."
>
> I am not sure if that alignment requirement refers to the start of the
> scanline or the length of the scanline (or both), it seems that this
> refers to the length only though.
>
> In your example the start of the first (and only) scanline is guaranteed
> to be not word aligned (2808 void* bitmapBits = (char*)mem1 - 1;) so
> this test may fail (on different Windows versions?) for different reasons.
>
> Since the code seems to work, I am okay with it though.
>
> If you only intend to fix the typo, I do not need a re-review.
I've tested by misaligning the memory, and it seems to work.
However, I've updated the code to ensure that both memory and and width
bytes are aligned, just to be sure. I've also added some more comments
to describe the chosen value:
https://cr.openjdk.java.net/~stefank/8245002/webrev.03.workaround.thomas-review/
https://cr.openjdk.java.net/~stefank/8245002/webrev.all.thomas-review/
Thanks,
StefanK
>
> Looks good.
>
> Thanks,
> Thomas
More information about the hotspot-dev
mailing list