> On Nov 1, 2018, at 1:16 AM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: > > My patch lets people allocate 4MB. (U32_MAX / 4096 * sizeof(void *)). > Surely, that's enough? I liked my check because it avoids the divide so > it's faster and it is a no-op on 64bit systems. It should be enough, and you're right, it does avoid extra math. However, in that case I'd like to see a comment added so that anyone looking at the code in the future knows why you limited the allocation to ULONG_MAX bytes. Thanks, William Kucharski