kernel/vm: Actually initialize all members of the vm_page bitfield.
If we do, the compiler should merge the stores and avoid loading and masking, saving some instructions.
This commit is contained in:
@@ -205,18 +205,23 @@ inline void
|
|||||||
vm_page::Init(page_num_t pageNumber)
|
vm_page::Init(page_num_t pageNumber)
|
||||||
{
|
{
|
||||||
physical_page_number = pageNumber;
|
physical_page_number = pageNumber;
|
||||||
InitState(PAGE_STATE_FREE);
|
|
||||||
new(&mappings) vm_page_mappings();
|
new(&mappings) vm_page_mappings();
|
||||||
fWiredCount = 0;
|
|
||||||
usage_count = 0;
|
|
||||||
busy_writing = false;
|
|
||||||
SetCacheRef(NULL);
|
SetCacheRef(NULL);
|
||||||
#if DEBUG_PAGE_QUEUE
|
|
||||||
queue = NULL;
|
InitState(PAGE_STATE_FREE);
|
||||||
#endif
|
busy = busy_writing = false;
|
||||||
#if DEBUG_PAGE_ACCESS
|
accessed = modified = false;
|
||||||
accessing_thread = -1;
|
_unused = 0;
|
||||||
#endif
|
usage_count = 0;
|
||||||
|
|
||||||
|
fWiredCount = 0;
|
||||||
|
|
||||||
|
#if DEBUG_PAGE_QUEUE
|
||||||
|
queue = NULL;
|
||||||
|
#endif
|
||||||
|
#if DEBUG_PAGE_ACCESS
|
||||||
|
accessing_thread = -1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user