1515**=========================================================*/
1616
1717#include < palsuite.h>
18+ #include < minipal/ospagesize.h>
1819
1920PALTEST (miscellaneous_IsBadWritePtr_test2_paltest_isbadwriteptr_test2, " miscellaneous/IsBadWritePtr/test2/paltest_isbadwriteptr_test2" )
2021{
@@ -31,7 +32,7 @@ PALTEST(miscellaneous_IsBadWritePtr_test2_paltest_isbadwriteptr_test2, "miscella
3132 */
3233
3334 PageOne = VirtualAlloc (NULL ,
34- GetOsPageSize ()*4 ,
35+ minipal_getpagesize ()*4 ,
3536 MEM_RESERVE,
3637 PAGE_NOACCESS);
3738
@@ -43,7 +44,7 @@ PALTEST(miscellaneous_IsBadWritePtr_test2_paltest_isbadwriteptr_test2, "miscella
4344 /* Set the first Page to PAGE_NOACCESS */
4445
4546 PageOne = VirtualAlloc (PageOne,
46- GetOsPageSize (),
47+ minipal_getpagesize (),
4748 MEM_COMMIT,
4849 PAGE_NOACCESS);
4950
@@ -57,8 +58,8 @@ PALTEST(miscellaneous_IsBadWritePtr_test2_paltest_isbadwriteptr_test2, "miscella
5758
5859 /* Set the second Page to PAGE_READWRITE */
5960
60- PageTwo = VirtualAlloc (((BYTE*)PageOne)+GetOsPageSize (),
61- GetOsPageSize (),
61+ PageTwo = VirtualAlloc (((BYTE*)PageOne)+minipal_getpagesize (),
62+ minipal_getpagesize (),
6263 MEM_COMMIT,
6364 PAGE_READWRITE);
6465 if (PageTwo == NULL )
@@ -71,8 +72,8 @@ PALTEST(miscellaneous_IsBadWritePtr_test2_paltest_isbadwriteptr_test2, "miscella
7172
7273 /* Set the third Page to PAGE_NOACCESS */
7374
74- PageThree = VirtualAlloc (((BYTE*)PageTwo) + (2 * GetOsPageSize ()),
75- GetOsPageSize (),
75+ PageThree = VirtualAlloc (((BYTE*)PageTwo) + (2 * minipal_getpagesize ()),
76+ minipal_getpagesize (),
7677 MEM_COMMIT,
7778 PAGE_NOACCESS);
7879
@@ -87,7 +88,7 @@ PALTEST(miscellaneous_IsBadWritePtr_test2_paltest_isbadwriteptr_test2, "miscella
8788
8889/* Check that calling IsBadWritePtr on the first page returns non-zero */
8990
90- if (IsBadWritePtr (PageThree,GetOsPageSize ()) == 0 )
91+ if (IsBadWritePtr (PageThree,minipal_getpagesize ()) == 0 )
9192 {
9293 VirtualFree (PageOne,0 ,MEM_RELEASE);
9394
@@ -98,7 +99,7 @@ PALTEST(miscellaneous_IsBadWritePtr_test2_paltest_isbadwriteptr_test2, "miscella
9899
99100 /* Check that calling IsBadWritePtr on the middle page returns 0 */
100101
101- if (IsBadWritePtr (PageTwo,GetOsPageSize ()) != 0 )
102+ if (IsBadWritePtr (PageTwo,minipal_getpagesize ()) != 0 )
102103 {
103104 VirtualFree (PageOne,0 ,MEM_RELEASE);
104105
@@ -108,7 +109,7 @@ PALTEST(miscellaneous_IsBadWritePtr_test2_paltest_isbadwriteptr_test2, "miscella
108109
109110 /* Check that calling IsBadWritePtr on the third page returns non-zero */
110111
111- if (IsBadWritePtr (PageThree,GetOsPageSize ()) == 0 )
112+ if (IsBadWritePtr (PageThree,minipal_getpagesize ()) == 0 )
112113 {
113114 VirtualFree (PageOne,0 ,MEM_RELEASE);
114115
0 commit comments