Re: PATCH: allow percentile size of tmpfs (2.5.66 / 2.4.20-pre2)

From: Xavier Bestel (xavier.bestel@free.fr)
Date: Tue Apr 01 2003 - 05:59:49 EST


                        size = memparse(value,&rest);
+ if (*rest == '%') {
+ struct sysinfo si;
+ si_meminfo(&si);
+ size = (si.totalram << PAGE_CACHE_SHIFT) / 100 * size;

(si.totalram << PAGE_CACHE_SHIFT) * size / 100;
would have been better precision-wise.

        Xav

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Apr 07 2003 - 22:00:13 EST