summaryrefslogtreecommitdiff
path: root/src/pal/src/thread/thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/src/thread/thread.cpp')
-rw-r--r--src/pal/src/thread/thread.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pal/src/thread/thread.cpp b/src/pal/src/thread/thread.cpp
index df42ebcc96..e56761b3d6 100644
--- a/src/pal/src/thread/thread.cpp
+++ b/src/pal/src/thread/thread.cpp
@@ -579,7 +579,7 @@ CorUnix::InternalCreateThread(
if (alignedStackSize != 0)
{
// Some systems require the stack size to be aligned to the page size
- if (sizeof(alignedStackSize) <= sizeof(dwStackSize) && alignedStackSize + (VIRTUAL_PAGE_SIZE - 1) < alignedStackSize)
+ if (sizeof(alignedStackSize) <= sizeof(dwStackSize) && alignedStackSize + (GetVirtualPageSize() - 1) < alignedStackSize)
{
// When coming here from the public API surface, the incoming value is originally a nonnegative signed int32, so
// this shouldn't happen
@@ -589,7 +589,7 @@ CorUnix::InternalCreateThread(
palError = ERROR_INVALID_PARAMETER;
goto EXIT;
}
- alignedStackSize = ALIGN_UP(alignedStackSize, VIRTUAL_PAGE_SIZE);
+ alignedStackSize = ALIGN_UP(alignedStackSize, GetVirtualPageSize());
}
// Ignore the STACK_SIZE_PARAM_IS_A_RESERVATION flag
@@ -641,7 +641,7 @@ CorUnix::InternalCreateThread(
#else // !PTHREAD_STACK_MIN
const size_t MinStackSize = 64 * 1024; // this value is typically accepted by pthread_attr_setstacksize()
#endif // PTHREAD_STACK_MIN
- _ASSERTE(IS_ALIGNED(MinStackSize, VIRTUAL_PAGE_SIZE));
+ _ASSERTE(IS_ALIGNED(MinStackSize, GetVirtualPageSize()));
if (alignedStackSize < MinStackSize)
{
// Adjust the stack size to a minimum value that is likely to be accepted by pthread_attr_setstacksize(). If this