Put sanity check for negative hold count into #ifdef DIAGNOSTIC so that

it doesn't consume an extra 3k of kernel text because of gcc's bogus
inlining code.
This commit is contained in:
David Greenman 1994-10-17 10:43:56 +00:00
parent 8678b0ebb5
commit 27de4e40b8

View File

@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: vm_page.h,v 1.6 1994/09/27 18:00:29 davidg Exp $
* $Id: vm_page.h,v 1.7 1994/10/05 09:48:44 davidg Exp $
*/
/*
@ -265,8 +265,12 @@ static inline void
vm_page_unhold(mem)
vm_page_t mem;
{
#ifdef DIAGNOSTIC
if( --mem->hold_count < 0)
panic("vm_page_unhold: hold count < 0!!!");
#else
--mem->hold_count;
#endif
}
#endif /* KERNEL */