mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-13 18:27:35 +00:00
Add nsGCCache to the leak/bloat stats. r=pavlov@netscape.com sr=waterson@netscape.com b=60215
This commit is contained in:
parent
1929738b70
commit
994a352f4c
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "nsGCCache.h"
|
#include "nsGCCache.h"
|
||||||
|
#include "nsISupportsUtils.h"
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
#include <gdk/gdkprivate.h>
|
#include <gdk/gdkprivate.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
@ -33,8 +34,11 @@
|
|||||||
|
|
||||||
GdkRegion *nsGCCache::copyRegion = NULL;
|
GdkRegion *nsGCCache::copyRegion = NULL;
|
||||||
|
|
||||||
|
MOZ_DECL_CTOR_COUNTER(nsGCCache)
|
||||||
|
|
||||||
nsGCCache::nsGCCache()
|
nsGCCache::nsGCCache()
|
||||||
{
|
{
|
||||||
|
MOZ_COUNT_CTOR(nsGCCache);
|
||||||
PR_INIT_CLIST(&GCCache);
|
PR_INIT_CLIST(&GCCache);
|
||||||
PR_INIT_CLIST(&GCFreeList);
|
PR_INIT_CLIST(&GCFreeList);
|
||||||
for (int i = 0; i < GC_CACHE_SIZE; i++) {
|
for (int i = 0; i < GC_CACHE_SIZE; i++) {
|
||||||
@ -71,6 +75,8 @@ nsGCCache::~nsGCCache()
|
|||||||
{
|
{
|
||||||
PRCList *head;
|
PRCList *head;
|
||||||
|
|
||||||
|
MOZ_COUNT_DTOR(nsGCCache);
|
||||||
|
|
||||||
ReportStats();
|
ReportStats();
|
||||||
|
|
||||||
while (!PR_CLIST_IS_EMPTY(&GCCache)) {
|
while (!PR_CLIST_IS_EMPTY(&GCCache)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user