]> gitweb.factorcode.org Git - factor.git/commitdiff
moved align_page into vm
authorPhil Dawes <phil@phildawes.net>
Tue, 18 Aug 2009 18:35:12 +0000 (19:35 +0100)
committerPhil Dawes <phil@phildawes.net>
Wed, 16 Sep 2009 07:16:29 +0000 (08:16 +0100)
vm/inlineimpls.hpp
vm/segments.hpp
vm/vm.hpp

index 90ccd8d8695f96e4f78fb39008274a8fc983c44c..ca0b13be39b45551a151fb8b3587edafcc638650 100644 (file)
@@ -4,6 +4,18 @@ namespace factor
 // I've had to copy inline implementations here to make dependencies work. Am hoping to move this code back into include files
 // once the rest of the reentrant changes are done. -PD
 
+// segments.hpp
+
+inline cell factorvm::align_page(cell a)
+{
+       return align(a,getpagesize());
+}
+
+inline static cell align_page(cell a)
+{
+       return vm->align_page(a);
+}
+
 // write_barrier.hpp
 
 inline card *factorvm::addr_to_card(cell a)
index 36b5bc747be3134bcd0d88bdb6de09326ff5ba6f..a715b4dabcdfbdbed6e0c1aed44f96057ae9891d 100644 (file)
@@ -7,9 +7,4 @@ struct segment {
        cell end;
 };
 
-inline static cell align_page(cell a)
-{
-       return align(a,getpagesize());
-}
-
 }
index 3a228261376d6f2cf04234846c99db2da60cfddc..9ee5a2d81fcc3c2d08f377b85b5907f4158d009b 100644 (file)
--- a/vm/vm.hpp
+++ b/vm/vm.hpp
@@ -3,6 +3,9 @@ namespace factor
 
 struct factorvm {
 
+       // segments
+       inline cell align_page(cell a);
+
        // contexts
        cell ds_size, rs_size;
        context *unused_contexts;