Date: Tue, 14 Nov 2000 04:39:54 -0800 From: Julian Elischer <julian@elischer.org> To: Bosko Milekic <bmilekic@dsuper.net> Cc: David Malone <dwmalone@maths.tcd.ie>, iedowse@maths.tcd.ie, freebsd-net@freebsd.org Subject: Re: M_RDONLY: review & comment Message-ID: <3A11329A.D54E17E3@elischer.org> References: <Pine.BSF.4.21.0011121119030.11341-100000@jehovah.technokratis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Bosko Milekic wrote: > > On Sun, 12 Nov 2000, David Malone wrote: > > > The other option I thought of is to use a char *. You could point > > to a static string describing the type of external storage. This > > way is still fast comparing types, just compare the pointers. If > > you want to know what the type is in human readable format (for > > debugging) you just look at the string it points at. Also the > > kernel allocates different addresses for different strings, so > > it automatically solves the problem of allocating unique numbers > > to each type. > > > > David. > using char * is unsafe if the aim is to tag mbufs that were allocated by some module, if the midule is unloaded.. (the mbufs may hang around in some queu way afte the module has gone.. and an attempt to follow the char 8 pointer......) -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000 ---> X_.---._/ presently in: Budapest v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A11329A.D54E17E3>