On Sun, 3 Aug 2003, david ramblewski wrote: > I am modifying the mount code and i find this: > malloc(...,M_UFSMNT,...) > > In malloc.h: > #define M_UFSMNT 28 > > There is a lot of "define" about filesystems in malloc.h and it seems to > represent every types of memories which can be allocated. I'm searching > in the source but i don't know how and why they use it. Someone knows > the solution?
I don't believe code looking like this has existed in FreeBSD since 2.x, or maybe early 3.x; what version of the source code are you using? I noticed recently that Darwin uses this approach still, however. In FreeBSD 4.x and 5.x (and I believe 3.x), malloc types are defined using the MALLOC_DEFINE() macro, and declared using MALLOC_DECL(). You can read the malloc(9) man page for some details on how to use the buckets. If you use vmstat -m, you can see reports on the bucket sizes and allocation on a running kernel. > Does someone knows where i can find documentations about filesystems > under BSD (FFS). I'd suggest starting with the "BSD Book" -- Design and Implementation of 4.4BSD by McKusick, et al. That should include some basic background on the fast file system. More recently, you'll want to read the USENIX/FREENIX/BSDCON papers on Soft Updates, background file system checking, snapshotting, et al. Take a look at the USENIX web site for these papers. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects [EMAIL PROTECTED] Network Associates Laboratories _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

