mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:08:12 +00:00
AK: Fix broken instrumentation code for StringImpl.
This commit is contained in:
parent
cf8dd312ab
commit
e74c833af3
1 changed files with 4 additions and 0 deletions
|
@ -3,6 +3,8 @@
|
||||||
#include "kmalloc.h"
|
#include "kmalloc.h"
|
||||||
#include "HashTable.h"
|
#include "HashTable.h"
|
||||||
|
|
||||||
|
//#define DEBUG_STRINGIMPL
|
||||||
|
|
||||||
#ifdef DEBUG_STRINGIMPL
|
#ifdef DEBUG_STRINGIMPL
|
||||||
unsigned g_stringimpl_count;
|
unsigned g_stringimpl_count;
|
||||||
static HashTable<StringImpl*>* g_all_live_stringimpls;
|
static HashTable<StringImpl*>* g_all_live_stringimpls;
|
||||||
|
@ -33,6 +35,8 @@ StringImpl::StringImpl(ConstructWithInlineBufferTag, size_t length)
|
||||||
, m_characters(m_inline_buffer)
|
, m_characters(m_inline_buffer)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_STRINGIMPL
|
#ifdef DEBUG_STRINGIMPL
|
||||||
|
if (!g_all_live_stringimpls)
|
||||||
|
g_all_live_stringimpls = new HashTable<StringImpl*>;
|
||||||
++g_stringimpl_count;
|
++g_stringimpl_count;
|
||||||
g_all_live_stringimpls->set(this);
|
g_all_live_stringimpls->set(this);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue