Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: nspr/lib/ds/plarenas.h

Issue 68173008: Update to NSPR 4.10.2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Update README.chromium Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « nspr/lib/ds/plarena.c ('k') | nspr/pr/include/md/_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nspr/lib/ds/plarenas.h
===================================================================
--- nspr/lib/ds/plarenas.h (revision 233722)
+++ nspr/lib/ds/plarenas.h (working copy)
@@ -47,6 +47,9 @@
/*
** Friend functions used by the PL_ARENA_*() macros.
+**
+** WARNING: do not call these functions directly. Always use the
+** PL_ARENA_*() macros.
**/
PR_EXTERN(void *) PL_ArenaAllocate(PLArenaPool *pool, PRUint32 nb);
@@ -60,6 +63,19 @@
*/
PR_EXTERN(void) PL_ClearArenaPool(PLArenaPool *pool, PRInt32 pattern);
+/*
+** A function like malloc_size() or malloc_usable_size() that measures the
+** size of a heap block.
+*/
+typedef size_t (*PLMallocSizeFn)(const void *ptr);
+
+/*
+** Measure all memory used by a PLArenaPool, excluding the PLArenaPool
+** structure.
+*/
+PR_EXTERN(size_t) PL_SizeOfArenaPoolExcludingPool(
+ const PLArenaPool *pool, PLMallocSizeFn mallocSizeOf);
+
PR_END_EXTERN_C
#endif /* PLARENAS_H */
« no previous file with comments | « nspr/lib/ds/plarena.c ('k') | nspr/pr/include/md/_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698