* Removed unused vm_page::busy_{reading|writing} fields.

* Fixed vm_page_allocate_page_run(): it did not take the pageState into account,
  and would therefore return uninitialized memory (ie. B_CONTIGUOUS areas would
  contain garbage).
  Now, it stores if a page is cleared in a new vm_page::is_cleared field.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22306 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2007-09-25 15:04:29 +00:00
parent 282c8843cd
commit 8c657126cd
5 changed files with 75 additions and 119 deletions
-1
View File
@@ -37,7 +37,6 @@ status_t vm_page_write_modified(vm_cache *cache, bool fsReenter);
vm_page *vm_page_allocate_page(int state);
status_t vm_page_allocate_pages(int pageState, vm_page **pages, uint32 numPages);
vm_page *vm_page_allocate_page_run(int state, addr_t length);
vm_page *vm_page_allocate_specific_page(addr_t page_num, int state);
vm_page *vm_page_at_index(int32 index);
vm_page *vm_lookup_page(addr_t pageNumber);
+3 -2
View File
@@ -105,8 +105,9 @@ typedef struct vm_page {
uint8 type : 2;
uint8 state : 3;
uint8 busy_reading : 1;
uint8 busy_writing : 1;
uint8 is_cleared : 1;
// is currently only used in vm_page_allocate_page_run()
uint16 wired_count;
int8 usage_count;