Subject: Re: README: kernel pty struct allocation change
To: David Brownlee <abs@netbsd.org>
From: Jaromír Doleček <dolecek@ibis.cz>
List: current-users
Date: 09/10/2000 22:55:23
> Do the INSTALL kernel configs need any tweaking to save as much
> space as possible after this change? (IIRC they need two ptys)
No tweaking should be necessary. Since INSTALL kernel contain
pseudo-device pty 64
there is an array of 64 pointers allocated on pty "device" attach. This is
64 * sizeof(struct pt_softc *). The individual (struct pt_softc)'s
are allocated on demand, so only two are needed.
This is:
64 * sizeof(struct pt_softc *) + 2 * sizeof(struct pt_softc)
which is like 64 * 4 + 2 * 22 = 300 bytes. Actually, the 22 byte
quantity would be taken from 32 byte bucket, so actual usage
would be 320 bytes.
Previously it was
64 * sizeof(struct pt_softc)
which is like 1408 bytes. The number of allocated (struct tty)'s is
same for both cases, i.e. two - this makes like 500 bytes on i386.
Jaromir
--
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.ics.muni.cz/~dolecek/
@@@@ Wanna a real operating system ? Go and get NetBSD, damn! @@@@