On 01/26/2018 07:53 AM, Eric Blake wrote: > On 01/26/2018 07:17 AM, Richard W.M. Jones wrote: >> When compiling on armv7 it becomes clear from the compiler warnings >> that the current code is wrong. >> >> The bitmap has to be allocated in virtual memory, so use size_t to >> describe the length of the bitmap. When changing the length of the >> bitmap, compute the new size as an unsigned 64 bit int, and then check >> whether or not it is too large to fit into size_t before casting it. > > Indeed, size_t is a sane limit (the only way to get a larger map would > be using an mmap'd file on disk, so that we can use 64-bit off_t instead > of 32-bit size_t).
and using a second layer of caching to swap in windows of that file as needed, as the entire file won't fit in memory at once. That's a lot of bookkeeping overhead, for something that is less and less useful as more people use 64-bit machines. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Libguestfs mailing list [email protected] https://www.redhat.com/mailman/listinfo/libguestfs
