summaryrefslogtreecommitdiff
path: root/src/pal/tests/palsuite
diff options
context:
space:
mode:
authorSteve MacLean <sdmaclea.qdt@qualcommdatacenter.com>2017-06-12 17:14:12 -0400
committerMaoni Stephens <Maoni0@users.noreply.github.com>2017-06-12 14:14:12 -0700
commit0ee3b5e64a98dc71aefed2304fe4bcf7f66ca9f5 (patch)
tree8f099e2391d8990de1c7d0f4ca4c3fcae6839e4d /src/pal/tests/palsuite
parentc655981474be1d3aa0165408e5c3914c5cfc35a1 (diff)
downloadcoreclr-0ee3b5e64a98dc71aefed2304fe4bcf7f66ca9f5.tar.gz
coreclr-0ee3b5e64a98dc71aefed2304fe4bcf7f66ca9f5.tar.bz2
coreclr-0ee3b5e64a98dc71aefed2304fe4bcf7f66ca9f5.zip
[Arm64/Unix] Add 64K page support (#10981)
* [Arm64/Unix] Support 64K pages * GC move GCToOSInterface::Initialize() into InitializeGarbageCollector()
Diffstat (limited to 'src/pal/tests/palsuite')
-rw-r--r--src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/test2.cpp19
-rw-r--r--src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/test3.cpp6
2 files changed, 11 insertions, 14 deletions
diff --git a/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/test2.cpp b/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/test2.cpp
index 2d4d53e3b7..b5e22ea70e 100644
--- a/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/test2.cpp
+++ b/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test2/test2.cpp
@@ -16,7 +16,6 @@
**=========================================================*/
#include <palsuite.h>
-#define PAGE_SIZE 4096
int __cdecl main(int argc, char *argv[]) {
@@ -32,7 +31,7 @@ int __cdecl main(int argc, char *argv[]) {
*/
PageOne = VirtualAlloc(NULL,
- PAGE_SIZE*4,
+ GetOsPageSize()*4,
MEM_RESERVE,
PAGE_NOACCESS);
@@ -44,7 +43,7 @@ int __cdecl main(int argc, char *argv[]) {
/* Set the first Page to PAGE_NOACCESS */
PageOne = VirtualAlloc(PageOne,
- PAGE_SIZE,
+ GetOsPageSize(),
MEM_COMMIT,
PAGE_NOACCESS);
@@ -58,8 +57,8 @@ int __cdecl main(int argc, char *argv[]) {
/* Set the second Page to PAGE_READWRITE */
- PageTwo = VirtualAlloc(((BYTE*)PageOne)+PAGE_SIZE,
- PAGE_SIZE,
+ PageTwo = VirtualAlloc(((BYTE*)PageOne)+GetOsPageSize(),
+ GetOsPageSize(),
MEM_COMMIT,
PAGE_READWRITE);
if(PageTwo == NULL)
@@ -72,8 +71,8 @@ int __cdecl main(int argc, char *argv[]) {
/* Set the third Page to PAGE_NOACCESS */
- PageThree = VirtualAlloc(((BYTE*)PageTwo) + (2 * PAGE_SIZE),
- PAGE_SIZE,
+ PageThree = VirtualAlloc(((BYTE*)PageTwo) + (2 * GetOsPageSize()),
+ GetOsPageSize(),
MEM_COMMIT,
PAGE_NOACCESS);
@@ -88,7 +87,7 @@ int __cdecl main(int argc, char *argv[]) {
/* Check that calling IsBadWritePtr on the first page returns non-zero */
- if(IsBadWritePtr(PageThree,PAGE_SIZE) == 0)
+ if(IsBadWritePtr(PageThree,GetOsPageSize()) == 0)
{
VirtualFree(PageOne,0,MEM_RELEASE);
@@ -99,7 +98,7 @@ int __cdecl main(int argc, char *argv[]) {
/* Check that calling IsBadWritePtr on the middle page returns 0 */
- if(IsBadWritePtr(PageTwo,PAGE_SIZE) != 0)
+ if(IsBadWritePtr(PageTwo,GetOsPageSize()) != 0)
{
VirtualFree(PageOne,0,MEM_RELEASE);
@@ -109,7 +108,7 @@ int __cdecl main(int argc, char *argv[]) {
/* Check that calling IsBadWritePtr on the third page returns non-zero */
- if(IsBadWritePtr(PageThree,PAGE_SIZE) == 0)
+ if(IsBadWritePtr(PageThree,GetOsPageSize()) == 0)
{
VirtualFree(PageOne,0,MEM_RELEASE);
diff --git a/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/test3.cpp b/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/test3.cpp
index 4c058a8987..7b04c548cc 100644
--- a/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/test3.cpp
+++ b/src/pal/tests/palsuite/miscellaneous/IsBadWritePtr/test3/test3.cpp
@@ -14,8 +14,6 @@
#include <palsuite.h>
-#define PAGE_SIZE 4096
-
int __cdecl main(int argc, char *argv[]) {
LPVOID PageOne;
@@ -30,7 +28,7 @@ int __cdecl main(int argc, char *argv[]) {
*/
PageOne = VirtualAlloc(NULL,
- PAGE_SIZE,
+ GetOsPageSize(),
MEM_COMMIT,
PAGE_READONLY);
@@ -39,7 +37,7 @@ int __cdecl main(int argc, char *argv[]) {
Fail("ERROR: VirtualAlloc failed to commit the required memory.\n");
}
- if(IsBadWritePtr(PageOne,PAGE_SIZE) == 0)
+ if(IsBadWritePtr(PageOne,GetOsPageSize()) == 0)
{
VirtualFree(PageOne,0,MEM_RELEASE);