Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: syssrc/sys/kern



enami tsugutomo <enami%sm.sony.co.jp@localhost> writes:

> > Log Message:
> > crfree(): add DIAGNOSTIC sanity check of cr_ref; unfortunately, if the 
> > memory
> > is freed prematurely the check won't be triggered immediatelly, probably
> > since the memory is likely to be reused fast; but it _would_ be triggered
> > eventually
> 
> This check doesn't make sense also when crhold() is called
> sequencially (i.e., twice without crfree()), does it?

Ah, if you're expecting cr_ref is 0 after it is free(9)'ed, you can't.
You'll see 0xdeadbeef there (even if !DIAGNOSTIC, the first word is
used to hold a pointer in freelist).

enami.



Home | Main Index | Thread Index | Old Index