From 472dc0c360efceca885b37958bbf7b357185ee72 Mon Sep 17 00:00:00 2001 From: "wtc%google.com" Date: Mon, 11 Feb 2013 15:36:33 +0000 Subject: [PATCH] Bug 807883: Add 'const' to the 'pool' parameter and 'arena' local variable of PL_SizeOfArenaPoolExcludingPool. Fix comments. r=n.nethercote. Modified Files: plarena.c plarenas.h git-svn-id: svn://10.0.0.236/trunk@264716 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/nsprpub/lib/ds/plarena.c | 6 +++--- mozilla/nsprpub/lib/ds/plarenas.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mozilla/nsprpub/lib/ds/plarena.c b/mozilla/nsprpub/lib/ds/plarena.c index cc2ffb00a89..40531951453 100644 --- a/mozilla/nsprpub/lib/ds/plarena.c +++ b/mozilla/nsprpub/lib/ds/plarena.c @@ -346,14 +346,14 @@ PR_IMPLEMENT(void) PL_ArenaFinish(void) } PR_IMPLEMENT(size_t) PL_SizeOfArenaPoolExcludingPool( - PLArenaPool *pool, PLMallocSizeFn mallocSizeOf) + const PLArenaPool *pool, PLMallocSizeFn mallocSizeOf) { /* * The first PLArena is within |pool|, so don't measure it. Subsequent - * PLArenas are separate and must measured. + * PLArenas are separate and must be measured. */ size_t size = 0; - PLArena *arena = pool->first.next; + const PLArena *arena = pool->first.next; while (arena) { size += mallocSizeOf(arena); arena = arena->next; diff --git a/mozilla/nsprpub/lib/ds/plarenas.h b/mozilla/nsprpub/lib/ds/plarenas.h index 4cbe32c4c39..f4a00cd1b82 100644 --- a/mozilla/nsprpub/lib/ds/plarenas.h +++ b/mozilla/nsprpub/lib/ds/plarenas.h @@ -61,17 +61,17 @@ PR_EXTERN(void) PL_ArenaRelease(PLArenaPool *pool, char *mark); PR_EXTERN(void) PL_ClearArenaPool(PLArenaPool *pool, PRInt32 pattern); /* -** A function like malloc_size() or malloc_usable_size() that returns the +** A function like malloc_size() or malloc_usable_size() that measures the ** size of a heap block. */ typedef size_t (*PLMallocSizeFn)(const void *ptr); /* -** Return all memory used by a PLArenaPool, excluding the PLArenaPool +** Measure all memory used by a PLArenaPool, excluding the PLArenaPool ** structure. */ PR_EXTERN(size_t) PL_SizeOfArenaPoolExcludingPool( - PLArenaPool *pool, PLMallocSizeFn mallocSizeOf); + const PLArenaPool *pool, PLMallocSizeFn mallocSizeOf); PR_END_EXTERN_C