Commit 2ba82852 authored by Marcelo Tosatti's avatar Marcelo Tosatti
Browse files

mempath prefault: fix off-by-one error



Fix off-by-one error (noticed by Andrea Arcangeli).

Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent 6bdf863d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1001,7 +1001,7 @@ static void *file_ram_alloc(RAMBlock *block,
        }

        /* MAP_POPULATE silently ignores failures */
        for (i = 0; i < (memory/hpagesize)-1; i++) {
        for (i = 0; i < (memory/hpagesize); i++) {
            memset(area + (hpagesize*i), 0, 1);
        }