Skip to contentSkip to conversation

fix reclaim memory incorrectly

PATCH New Xu, Anthony 1 participant 1 message Feb 28, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix reclaim memory incorrectly

Keir,
Below code segment may reclaim extra page (the last page which may be partially used by other user).

    init_domheap_pages(
        _image_start, (_image_start+image_len+PAGE_SIZE-1) & PAGE_MASK);

Signed-off-by Anthony Xu <[email protected]>

Thanks,
-Anthony

xen/arch/x86/domain_build.c +2 -2
diff -r a220579c2aa8 xen/arch/x86/domain_build.c
@@ -705,14 +705,14 @@
     }
 
     init_domheap_pages(
-        _image_start, (_image_start+image_len+PAGE_SIZE-1) & PAGE_MASK);
+        _image_start, _image_start+image_len);
 
     /* Copy the initial ramdisk and free temporary buffer. */
     if ( initrd_len != 0 )
     {
         memcpy((void *)vinitrd_start, initrd_start, initrd_len);
         init_domheap_pages(
-            _initrd_start, (_initrd_start+initrd_len+PAGE_SIZE-1) & PAGE_MASK);
+            _initrd_start, _initrd_start+initrd_len);
     }
 
     /* Set up start info area. */

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel