ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/vm_alloc.cpp
(Generate patch)

Comparing BasiliskII/src/Unix/vm_alloc.cpp (file contents):
Revision 1.14 by gbeauche, 2004-11-13T23:39:58Z vs.
Revision 1.15 by gbeauche, 2004-12-11T10:19:34Z

# Line 449 | Line 449 | int vm_protect(void * addr, size_t size,
449   #endif
450   }
451  
452 + /* Returns the size of a page.  */
453 +
454 + int vm_page_size(void)
455 + {
456 + #ifdef _WIN32
457 +    return 4096;
458 + #else
459 +    return getpagesize();
460 + #endif
461 + }
462 +
463   #ifdef CONFIGURE_TEST_VM_MAP
464   /* Tests covered here:
465     - TEST_VM_PROT_* program slices actually succeeds when a crash occurs
# Line 459 | Line 470 | int main(void)
470          vm_init();
471          
472   #define page_align(address) ((char *)((unsigned long)(address) & -page_size))
473 < #ifdef _WIN32
463 <        const unsigned long page_size = 4096;
464 < #else
465 <        unsigned long page_size = getpagesize();
466 < #endif
473 >        unsigned long page_size = vm_page_size();
474          
475          const int area_size = 6 * page_size;
476          volatile char * area = (volatile char *) vm_acquire(area_size);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines