Commit 7b3fe6c2 authored by Nicolas Denoyelle's avatar Nicolas Denoyelle Committed by Swann Perarnau
Browse files

Fix replace mmap with malloc to avoid map_anonymous warning

parent ff3cd379
Pipeline #12138 passed with stages
in 11 minutes and 40 seconds
......@@ -92,16 +92,13 @@ int main(void)
return 77;
const size_t size = (2 << 16); // 16 pages
void *host_buf = mmap(NULL, size,
PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS,
0, 0);
void *host_buf = malloc(size);
if (host_buf == NULL)
return 1;
test_default_area(size, host_buf);
test_custom_area(size, host_buf);
munmap(host_buf, size);
free(host_buf);
return 0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment