minios: clear FB content since _xmalloc may return non-zeroed memory

(in debug mode, notably).

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
This commit is contained in:
Keir Fraser committed 2008-05-12 10:10:45 +01:00
1 parent de239d043f
commit a58e7325d6
1 file changed
+2 -5
+2 -5
View File
@@ -303,13 +303,10 @@ static void fbfront_thread(void *p)
memsize = n * PAGE_SIZE;
fb = _xmalloc(memsize, PAGE_SIZE);
memset(fb, 0, memsize);
mfns = xmalloc_array(unsigned long, n);
for (i = 0; i < n; i++) {
/* trigger CoW */
((char *) fb) [i * PAGE_SIZE] = 0;
barrier();
for (i = 0; i < n; i++)
mfns[i] = virtual_to_mfn((char *) fb + i * PAGE_SIZE);
}
fb_dev = init_fbfront(NULL, mfns, WIDTH, HEIGHT, DEPTH, line_length, n);
xfree(mfns);
if (!fb_dev) {
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.