mirror of
https://github.com/reactos/reactos.git
synced 2025-07-06 02:01:23 +00:00
PAGESIZE to PAGE_SIZE.
svn path=/trunk/; revision=3637
This commit is contained in:
parent
a190455587
commit
21f3631d43
2 changed files with 8 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: spawn.c,v 1.5 2002/03/21 22:43:27 hyperion Exp $
|
/* $Id: spawn.c,v 1.6 2002/10/18 21:56:39 ea Exp $
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
|
@ -478,7 +478,7 @@ undoPData:
|
||||||
/* 5.1: set up the stack */
|
/* 5.1: set up the stack */
|
||||||
itInitialTeb.StackAllocate = NULL;
|
itInitialTeb.StackAllocate = NULL;
|
||||||
nVirtualSize = 0x100000;
|
nVirtualSize = 0x100000;
|
||||||
nCommitSize = 0x100000 - PAGESIZE;
|
nCommitSize = 0x100000 - PAGE_SIZE;
|
||||||
|
|
||||||
/* 5.1.1: reserve the stack */
|
/* 5.1.1: reserve the stack */
|
||||||
nErrCode = NtAllocateVirtualMemory
|
nErrCode = NtAllocateVirtualMemory
|
||||||
|
@ -505,7 +505,7 @@ undoPData:
|
||||||
(PVOID)((ULONG)itInitialTeb.StackBase - nCommitSize);
|
(PVOID)((ULONG)itInitialTeb.StackBase - nCommitSize);
|
||||||
|
|
||||||
/* 5.1.2: commit the stack */
|
/* 5.1.2: commit the stack */
|
||||||
nVirtualSize = nCommitSize + PAGESIZE;
|
nVirtualSize = nCommitSize + PAGE_SIZE;
|
||||||
pCommitBottom =
|
pCommitBottom =
|
||||||
(PVOID)((ULONG)itInitialTeb.StackBase - nVirtualSize);
|
(PVOID)((ULONG)itInitialTeb.StackBase - nVirtualSize);
|
||||||
|
|
||||||
|
@ -527,7 +527,7 @@ undoPData:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 5.1.3: set up the guard page */
|
/* 5.1.3: set up the guard page */
|
||||||
nVirtualSize = PAGESIZE;
|
nVirtualSize = PAGE_SIZE;
|
||||||
|
|
||||||
nErrCode = NtProtectVirtualMemory
|
nErrCode = NtProtectVirtualMemory
|
||||||
(
|
(
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: create.c,v 1.2 2002/02/20 09:17:57 hyperion Exp $
|
/* $Id: create.c,v 1.3 2002/10/18 21:56:39 ea Exp $
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
|
@ -63,10 +63,10 @@ int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
|
||||||
itInitialTeb.StackReserve = 0x100000;
|
itInitialTeb.StackReserve = 0x100000;
|
||||||
|
|
||||||
/* stack commit size */
|
/* stack commit size */
|
||||||
itInitialTeb.StackCommit = itInitialTeb.StackReserve - PAGESIZE;
|
itInitialTeb.StackCommit = itInitialTeb.StackReserve - PAGE_SIZE;
|
||||||
|
|
||||||
/* guard page */
|
/* guard page */
|
||||||
itInitialTeb.StackCommit += PAGESIZE;
|
itInitialTeb.StackCommit += PAGE_SIZE;
|
||||||
|
|
||||||
/* reserve stack */
|
/* reserve stack */
|
||||||
itInitialTeb.StackAllocate = NULL;
|
itInitialTeb.StackAllocate = NULL;
|
||||||
|
@ -118,7 +118,7 @@ int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
|
||||||
(
|
(
|
||||||
NtCurrentProcess(),
|
NtCurrentProcess(),
|
||||||
itInitialTeb.StackLimit,
|
itInitialTeb.StackLimit,
|
||||||
PAGESIZE,
|
PAGE_SIZE,
|
||||||
PAGE_GUARD | PAGE_READWRITE,
|
PAGE_GUARD | PAGE_READWRITE,
|
||||||
&nOldPageProtection
|
&nOldPageProtection
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue