no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / tools / jprof / stub / libmalloc.h
bloba78b35ade86df526c2544d5e0bbb549bd70cbcff
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef libmalloc_h___
6 #define libmalloc_h___
8 #include <sys/types.h>
9 #include <malloc.h>
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
15 #include "config.h"
17 typedef unsigned long u_long;
19 // For me->flags
20 #define JP_FIRST_AFTER_PAUSE 1
22 // Format of a jprof log entry. This is what's written out to the
23 // "jprof-log" file.
24 // It's called malloc_log_entry because the history of jprof is that
25 // it's a modified version of tracemalloc.
26 struct malloc_log_entry {
27 u_long delTime;
28 u_long numpcs;
29 unsigned int flags;
30 int thread;
31 char* pcs[MAX_STACK_CRAWL];
34 // Format of a malloc map entry; after this struct is nameLen+1 bytes of
35 // name data.
36 struct malloc_map_entry {
37 u_long nameLen;
38 u_long address; // base address
41 #ifdef __cplusplus
42 } /* end of extern "C" */
43 #endif
45 #endif /* libmalloc_h___ */