Subject: Re: README: kernel pty struct allocation change
To: David Brownlee <email@example.com>
From: Jaromír Doleček <firstname.lastname@example.org>
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.
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 Dolecek <jdolecek@NetBSD.org> http://www.ics.muni.cz/~dolecek/
@@@@ Wanna a real operating system ? Go and get NetBSD, damn! @@@@