зеркало из https://github.com/mozilla/gecko-dev.git
Bug 979913: Conditionally define PAGE_SIZE, r=khuey
With this patch the PAGE_SIZE value from the system is used if possible. The code still assumes that the PAGE_SIZE is 4096, but emits a warning if the actual value differs. If page size is not defined by the system, it is set to 4096 bytes and a warning is emitted as well.
This commit is contained in:
Родитель
aea66889b6
Коммит
69fdcaadac
|
@ -142,7 +142,12 @@ TLSInfoList;
|
|||
* methods or do large allocations on the stack to avoid stack overflow.
|
||||
*/
|
||||
#ifndef NUWA_STACK_SIZE
|
||||
#define PAGE_SIZE 4096
|
||||
#if !defined(PAGE_SIZE)
|
||||
#warning "PAGE_SIZE not defined, using 4096 bytes"
|
||||
#define PAGE_SIZE 4096ul
|
||||
#elif PAGE_SIZE != 4096ul
|
||||
#warning "System page size not 4096 bytes"
|
||||
#endif
|
||||
#define PAGE_ALIGN_MASK 0xfffff000
|
||||
#define NUWA_STACK_SIZE (1024 * 128)
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче