Date: Sat, 10 May 1997 23:51:41 +0200 From: j@uriah.heep.sax.de (J Wunsch) To: freebsd-hackers@FreeBSD.ORG Subject: Re: What swap for 1Gb memory? Message-ID: <19970510235141.QY09547@uriah.heep.sax.de> In-Reply-To: <Pine.NEB.3.96.970510112626.23154B-100000@narcissus.ml.org>; from The Devil Himself on May 10, 1997 11:28:05 -0700 References: <199705092351.SAA08559@nexgen.hiwaay.net> <Pine.NEB.3.96.970510112626.23154B-100000@narcissus.ml.org>
next in thread | previous in thread | raw e-mail | index | archive | help
As The Devil Himself wrote: > ..., because if the kernel panics, it dumps a complete image of memory > into the swap space, to be recovered on reboot for examination, and it can > do bad thigs if there's not enough swap. Coredumping is turned off in FreeBSD by default. It wouldn't make any sense to turn it on unless you've got a single (!) swap partition that is large enough to cover the entire physical memory. Even dumping across multiple partitions is unsupported. Whether attempts to dump core overwrite something or not is a matter of the responsible driver. The sd(4) driver seems to try to avoid this problem: nblocks = lp->d_partitions[part].p_size; /* check transfer bounds against partition size */ if ((dumplo < 0) || ((dumplo + num) > nblocks)) return (EINVAL); Well, looking again into it, it seems setdumpdev() in autoconf.c already attempts to prevent you from this accident, in that it doesn't accept a device as dumpdev if dumplo would underflow. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970510235141.QY09547>