Changeset 494 for Whitix/branches/hybrid
- Timestamp:
- 05/13/08 23:56:11 (4 months ago)
- Files:
-
- 1 modified
-
Whitix/branches/hybrid/memory/mmap.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/branches/hybrid/memory/mmap.c
r256 r494 21 21 #include <llist.h> 22 22 #include <malloc.h> 23 #include <module.h> 23 24 #include <typedefs.h> 24 25 #include <i386/i386.h> … … 60 61 } 61 62 63 SYMBOL_EXPORT(VmLookupAddress); 64 62 65 /*********************************************************************** 63 66 * … … 251 254 }else{ 252 255 newPage=PageAlloc(); 256 257 if (!newPage) 258 return -ENOMEM; 259 253 260 VirtMemMapPage(address,newPage->physAddr,area->protection); 254 261 … … 268 275 /* So no luck finding it in the VNode's mapping list - read it in */ 269 276 newPage=PageAlloc(); 277 278 if (!newPage) 279 return -ENOMEM; 280 270 281 VirtMemMapPage(address,newPage->physAddr,area->protection | PAGE_ACCESSED | PAGE_SHARED); 271 282 … … 347 358 348 359 address=PAGE_ALIGN(address); 360 361 // printf("%s: %d: MMapHandleFault(%#X, %d, %d, %d)\n", current->name, current->pid, address, error, VM_WRITE, VM_USER); 349 362 350 363 /* A null pointer has been deferenced */ … … 605 618 606 619 if (!(flags & MMAP_FIXED)) 607 address=MMapFindAddress(process, length);620 address=MMapFindAddress(process, length); 608 621 609 622 if (address < MMAP_BASE)
