BReferenceable: Always enable DEBUG in kernel mode when PARANOID_KERNEL_FREE is enabled.
This checks the reference counts are actually 0 (or 1 and allocated on the stack). As PARANOID_KERNEL_FREE is enabled at KDEBUG_LEVEL 2, this will thus be enabled on nightly builds.
This commit is contained in:
@@ -6,6 +6,13 @@
|
||||
|
||||
#include <Referenceable.h>
|
||||
|
||||
#ifdef _KERNEL_MODE
|
||||
# include "kernel_debug_config.h"
|
||||
# if PARANOID_KERNEL_FREE
|
||||
# define DEBUG
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
@@ -30,7 +37,7 @@ BReferenceable::BReferenceable()
|
||||
|
||||
BReferenceable::~BReferenceable()
|
||||
{
|
||||
#if defined(DEBUG) && !defined(_BOOT_MODE)
|
||||
#if !defined(_BOOT_MODE) && defined(DEBUG)
|
||||
bool enterDebugger = false;
|
||||
char message[256];
|
||||
if (fReferenceCount == 1) {
|
||||
|
||||
Reference in New Issue
Block a user