Re: [mod_backhand-devel] available memory for FreeBSD
Theo Schlossnagle <[email protected]> Mon, 23 Feb 2004 15:20:32 -0500
| Newsgroups | gmane.comp.apache.mod-backhand.devel |
|---|---|
| Message-ID | <[email protected]> |
Message got lost for a while... Looks good. comitted. On Tue, 2004-01-06 at 11:03, Petr Holub wrote: > Hi all, > > I would suggest a small correction for computing available memory > on FreeBSD: > > --- platform.c.old Sat Aug 24 22:16:03 2002 > +++ platform.c Tue Jan 6 17:00:31 2004 > @@ -589,8 +589,7 @@ > #endif > len = sizeof(struct vmtotal); > sysctl(mib, 2, &ourmem, &len, NULL, 0); > - ourmem.t_free /= 1024*1024; /* calculate in mb */ > - ss->amem=(int)usermem-(ourpagesize*ourmem.t_free); > + ss->amem=(int)ourpagesize*ourmem.t_free/(1024*1024); > ss->cpu =(int)ourcpu; > ss->ncpu=(int)ncpu; > /* Fill out hostname */ > > > Could somebody verify that it's OK? > > Thanks, > Petr > > _______________________________________________ > backhand-devel mailing list > [email protected] > http://lists.backhand.org/mailman/listinfo/backhand-devel -- // Theo Schlossnagle // Principal Engineer -- http://www.omniti.com/~jesus/ // Postal Engine -- http://www.postalengine.com/ // Ecelerity: fastest MTA on earth