[PATCH 3/5] Use sysconf(_SC_PAGESIZE) to determine PAGE_SIZE
Denys Vlasenko
vda.linux at googlemail.com
Sat Jun 4 02:15:56 UTC 2011
On Saturday 04 June 2011 00:38, Rich Felker wrote:
> On Fri, Jun 03, 2011 at 09:29:26PM +0200, Denys Vlasenko wrote:
> > Moreover, PAGE_SIZE is only used for
> >
> > mallopt(M_TRIM_THRESHOLD, 2 * PAGE_SIZE);
> > mallopt(M_MMAP_THRESHOLD, 8 * PAGE_SIZE - 256);
> >
> > We can simply use fixed constants instead.
>
> Agreed. The cleanest is:
>
> #ifndef PAGE_SIZE
> #define PAGE_SIZE 4096
> #endif
>
> Or perhaps even remove the use of PAGE_SIZE altogether and just use
> 4k everywhere.
Did it already.
--
vda
More information about the busybox
mailing list