Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Cleanup of curses dependency in v3_cons/cons_sc build
[palacios.git] / linux_usr / v3_mem.c
index cda781d..7949f3a 100644 (file)
@@ -51,7 +51,7 @@ int main(int argc, char * argv[]) {
     int mem_ready = 0;
 
     if (argc != 2) {
-       printf("Usage: v3_mem <memory size (MB)>\n");
+       printf("usage: v3_mem <memory size (MB)>\n");
        return -1;
     }
 
@@ -108,6 +108,11 @@ int main(int argc, char * argv[]) {
        if (bitmap_entries % 8) size++;
 
        bitmap = malloc(size);
+    if (!bitmap) {
+            printf("ERROR: could not allocate space for bitmap\n");
+            return -1;
+    }
+
        memset(bitmap, 0, size);
 
        for (i = 0; j < bitmap_entries - 1; i++) {