Rizin
unix-like reverse engineering framework and cli tools
linux_heap_jemalloc.c File Reference

Go to the source code of this file.

Macros

#define INCLUDE_HEAP_JEMALLOC_STD_C
 
#define HEAP32   1
 
#define GH(x)   x##_64
 
#define GHT   ut64
 
#define GHT_MAX   UT64_MAX
 
#define PFMTx   PFMT64x
 
#define OO(x)   (ut64)(arena + rz_offsetof(arena_t, x))
 

Functions

static bool GH() rz_resolve_jemalloc (RzCore *core, char *symname, ut64 *symbol)
 
static void GH() jemalloc_get_chunks (RzCore *core, const char *input)
 
static void GH() jemalloc_print_narenas (RzCore *core, const char *input)
 
static void GH() jemalloc_get_bins (RzCore *core, const char *input)
 
static int GH() cmd_dbg_map_jemalloc (RzCore *core, const char *input)
 

Macro Definition Documentation

◆ GH

#define GH (   x)    x##_64

Definition at line 23 of file linux_heap_jemalloc.c.

◆ GHT

#define GHT   ut64

Definition at line 24 of file linux_heap_jemalloc.c.

◆ GHT_MAX

#define GHT_MAX   UT64_MAX

Definition at line 25 of file linux_heap_jemalloc.c.

◆ HEAP32

#define HEAP32   1

Definition at line 6 of file linux_heap_jemalloc.c.

◆ INCLUDE_HEAP_JEMALLOC_STD_C

#define INCLUDE_HEAP_JEMALLOC_STD_C

Definition at line 5 of file linux_heap_jemalloc.c.

◆ OO

#define OO (   x)    (ut64)(arena + rz_offsetof(arena_t, x))

◆ PFMTx

#define PFMTx   PFMT64x

Definition at line 26 of file linux_heap_jemalloc.c.

Function Documentation

◆ cmd_dbg_map_jemalloc()

static int GH() cmd_dbg_map_jemalloc ( RzCore core,
const char *  input 
)
static

Definition at line 494 of file linux_heap_jemalloc.c.

494  {
495  const char *help_msg[] = {
496  "Usage:", "dmx", " # Jemalloc heap parsing commands",
497  "dmxa", "[arena_t]", "show all arenas created, or print arena_t structure for given arena",
498  "dmxb", "[arena_t]", "show all bins created for given arena",
499  "dmxc", "*|[arena_t]", "show all chunks created in all arenas, or show all chunks created for a given arena_t instance",
500  // "dmhr", "[arena_chunk_t]", "print all runs created for a given arena_chunk_t instance",
501  "dmx?", "", "Show map heap help", NULL
502  };
503 
504  switch (input[0]) {
505  case '?':
506  rz_core_cmd_help(core, help_msg);
507  break;
508  case 'a': // dmha
510  (core, input + 1);
511  break;
512  case 'b': // dmhb
514  (core, input + 1);
515  break;
516  case 'c': // dmhc
518  (core, input + 1);
519  break;
520  /*
521  case 'r': //dmhr
522  GH(jemalloc_get_runs) (core, input + 1);
523  break;
524  */
525  }
526  return 0;
527 }
RZ_API void rz_core_cmd_help(const RzCore *core, const char *help[])
Definition: cmd.c:163
#define NULL
Definition: cris-opc.c:27
#define GH(x)
static void GH() jemalloc_get_chunks(RzCore *core, const char *input)
static void GH() jemalloc_print_narenas(RzCore *core, const char *input)
static void GH() jemalloc_get_bins(RzCore *core, const char *input)
static bool input(void *ud, zip_uint8_t *data, zip_uint64_t length)

References GH, input(), jemalloc_get_bins(), jemalloc_get_chunks(), jemalloc_print_narenas(), NULL, and rz_core_cmd_help().

◆ jemalloc_get_bins()

static void GH() jemalloc_get_bins ( RzCore core,
const char *  input 
)
static

Definition at line 324 of file linux_heap_jemalloc.c.

324  {
325  int i = 0, j;
326  ut64 bin_info;
327  ut64 arenas;
328  GHT arena = GHT_MAX; //, bin = GHT_MAX;
329  arena_t *ar = NULL;
330  arena_bin_info_t *b = NULL;
332 
333  switch (input[0]) {
334  case ' ':
335  ar = RZ_NEW0(arena_t);
336  if (!ar) {
337  break;
338  }
339  b = RZ_NEW0(arena_bin_info_t);
340  if (!b) {
341  break;
342  }
343  if (!GH(rz_resolve_jemalloc)(core, "je_arena_bin_info", &bin_info)) {
344  RZ_LOG_ERROR("Cannot resolve je_arena_bin_info\n");
345  RZ_FREE(b);
346  break;
347  }
348  if (GH(rz_resolve_jemalloc)(core, "je_arenas", &arenas)) {
349  rz_io_read_at(core->io, arenas, (ut8 *)&arenas, sizeof(GHT));
350  PRINTF_GA("arenas @ 0x%" PFMTx " {\n", (GHT)arenas);
351  for (;;) {
352  rz_io_read_at(core->io, arenas + i * sizeof(GHT), (ut8 *)&arena, sizeof(GHT));
353  if (!arena) {
354  RZ_FREE(b);
355  break;
356  }
357  PRINTF_YA(" arenas[%d]: ", i++);
358  PRINTF_BA("@ 0x%" PFMTx, (GHT)arena);
359  PRINT_YA(" {\n");
360  rz_io_read_at(core->io, arena, (ut8 *)ar, sizeof(arena_t));
361  for (j = 0; j < JM_NBINS; j++) {
362  rz_io_read_at(core->io, (GHT)(bin_info + j * sizeof(arena_bin_info_t)),
363  (ut8 *)b, sizeof(arena_bin_info_t));
364  PRINT_YA(" {\n");
365  PRINT_YA(" regsize : ");
366  PRINTF_BA("0x%zx\n", b->reg_size);
367  PRINT_YA(" redzone size ");
368  PRINTF_BA("0x%zx\n", b->redzone_size);
369  PRINT_YA(" reg_interval : ");
370  PRINTF_BA("0x%zx\n", b->reg_interval);
371  PRINT_YA(" run_size : ");
372  PRINTF_BA("0x%zx\n", b->run_size);
373  PRINT_YA(" nregs : ");
374  PRINTF_BA("0x%x\n", b->nregs);
375  // FIXME: It's a structure of bitmap_info_t
376  // PRINT_YA (" bitmap_info : ");
377  // PRINTF_BA ("0x%"PFMT64x"\n", b->bitmap_info);
378  PRINT_YA(" reg0_offset : ");
379  PRINTF_BA("0x%" PFMT64x "\n\n", (ut64)b->reg0_offset);
380  // FIXME: It's a structure of malloc_mutex_t
381  // PRINTF_YA (" bins[%d]->lock ", j);
382  // PRINTF_BA ("= 0x%"PFMT64x"\n", ar->bins[j].lock);
383  // FIXME: It's a structure of arena_run_t*
384  // PRINTF_YA (" bins[%d]->runcur ", j);
385  // PRINTF_BA ("@ 0x%"PFMT64x"\n", ar->bins[j].runcur);
386  // FIXME: It's a structure of arena_run_heap_t*
387  // PRINTF_YA (" bins[%d]->runs ", j);
388  // PRINTF_BA ("@ 0x%"PFMTx"\n", ar->bins[j].runs);
389  // FIXME: It's a structure of malloc_bin_stats_t
390  // PRINTF_YA (" bins[%d]->stats ", j);
391  // PRINTF_BA ("= 0x%"PFMTx"\n", ar->bins[j].stats);
392  PRINT_YA(" }\n");
393  }
394  PRINT_YA(" }\n");
395  }
396  }
397  PRINT_GA("}\n");
398  break;
399  }
400  free(ar);
401  free(b);
402 }
lzma_index ** i
Definition: index.h:629
static const ut32 ar[]
Definition: apprentice.c:1935
RZ_API RzCons * rz_cons_singleton(void)
Definition: cons.c:300
RZ_API void Ht_() free(HtName_(Ht) *ht)
Definition: ht_inc.c:130
arena_t ** arenas
uint8_t ut8
Definition: lh5801.h:11
#define GHT
static bool GH() rz_resolve_jemalloc(RzCore *core, char *symname, ut64 *symbol)
#define PFMTx
#define GHT_MAX
#define PRINT_GA(msg)
Definition: rz_heap_glibc.h:20
#define PRINTF_GA(fmt,...)
Definition: rz_heap_glibc.h:14
#define PRINT_YA(msg)
Definition: rz_heap_glibc.h:19
#define PRINTF_YA(fmt,...)
Definition: rz_heap_glibc.h:13
#define PRINTF_BA(fmt,...)
Definition: rz_heap_glibc.h:15
RZ_API bool rz_io_read_at(RzIO *io, ut64 addr, ut8 *buf, int len)
Definition: io.c:300
#define RZ_LOG_ERROR(fmtstr,...)
Definition: rz_log.h:58
#define RZ_NEW0(x)
Definition: rz_types.h:284
#define RZ_FREE(x)
Definition: rz_types.h:369
#define PFMT64x
Definition: rz_types.h:393
#define b(i)
Definition: sha256.c:42
RzConsPrintablePalette pal
Definition: rz_cons.h:491
RzConsContext * context
Definition: rz_cons.h:502
RzIO * io
Definition: rz_core.h:313
ut64(WINAPI *w32_GetEnabledXStateFeatures)()

References ar, arenas, b, rz_cons_t::context, free(), GH, GHT, GHT_MAX, i, input(), NULL, rz_cons_context_t::pal, PFMT64x, PFMTx, PRINT_GA, PRINT_YA, PRINTF_BA, PRINTF_GA, PRINTF_YA, rz_cons_singleton(), RZ_FREE, rz_io_read_at(), RZ_LOG_ERROR, RZ_NEW0, rz_resolve_jemalloc(), and ut64().

Referenced by cmd_dbg_map_jemalloc().

◆ jemalloc_get_chunks()

static void GH() jemalloc_get_chunks ( RzCore core,
const char *  input 
)
static

Definition at line 123 of file linux_heap_jemalloc.c.

123  {
124  ut64 cnksz;
126 
127  if (!GH(rz_resolve_jemalloc)(core, "je_chunksize", &cnksz)) {
128  RZ_LOG_ERROR("Fail at reading symbol je_chunksize\n");
129  return;
130  }
131  rz_io_read_at(core->io, cnksz, (ut8 *)&cnksz, sizeof(GHT));
132 
133  switch (input[0]) {
134  case '\0':
135  RZ_LOG_ERROR("need an arena_t to associate chunks");
136  break;
137  case ' ': {
138  GHT arena = GHT_MAX;
139  arena_t *ar = RZ_NEW0(arena_t);
140  extent_node_t *node = RZ_NEW0(extent_node_t), *head = RZ_NEW0(extent_node_t);
141  input += 1;
142  arena = rz_num_math(core->num, input);
143 
144  if (arena) {
145  rz_io_read_at(core->io, arena, (ut8 *)ar, sizeof(arena_t));
146  rz_io_read_at(core->io, (GHT)(size_t)ar->achunks.qlh_first, (ut8 *)head, sizeof(extent_node_t));
147  if (head->en_addr) {
148  PRINT_YA(" Chunk - start: ");
149  PRINTF_BA("0x%08" PFMT64x, (ut64)(size_t)head->en_addr);
150  PRINT_YA(", end: ");
151  PRINTF_BA("0x%08" PFMT64x, (ut64)(size_t)((char *)head->en_addr + cnksz));
152  PRINT_YA(", size: ");
153  PRINTF_BA("0x%08" PFMT64x "\n", (ut64)cnksz);
154  rz_io_read_at(core->io, (ut64)(size_t)head->ql_link.qre_next, (ut8 *)node, sizeof(extent_node_t));
155  while (node && node->en_addr != head->en_addr) {
156  PRINT_YA(" Chunk - start: ");
157  PRINTF_BA("0x%08" PFMT64x, (ut64)(size_t)node->en_addr);
158  PRINT_YA(", end: ");
159  PRINTF_BA("0x%" PFMT64x, (ut64)(size_t)((char *)node->en_addr + cnksz));
160  PRINT_YA(", size: ");
161  PRINTF_BA("0x%08" PFMT64x "\n", cnksz);
162  rz_io_read_at(core->io, (ut64)(size_t)node->ql_link.qre_next, (ut8 *)node, sizeof(extent_node_t));
163  }
164  }
165  }
166  free(ar);
167  free(head);
168  free(node);
169  break;
170  }
171  case '*': {
172  int i = 0;
173  ut64 sym;
174  GHT arenas = GHT_MAX, arena = GHT_MAX;
175  arena_t *ar = RZ_NEW0(arena_t);
176  extent_node_t *node = RZ_NEW0(extent_node_t);
177  extent_node_t *head = RZ_NEW0(extent_node_t);
178 
179  if (!node || !head) {
180  RZ_LOG_ERROR("Failed to allocate extent_node_t\n");
181  free(ar);
182  free(node);
183  free(head);
184  return;
185  }
186 
187  if (GH(rz_resolve_jemalloc)(core, "je_arenas", &sym)) {
188  rz_io_read_at(core->io, sym, (ut8 *)&arenas, sizeof(GHT));
189  for (;;) {
190  rz_io_read_at(core->io, arenas + i * sizeof(GHT), (ut8 *)&arena, sizeof(GHT));
191  if (!arena) {
192  break;
193  }
194  PRINTF_GA("arenas[%d]: @ 0x%" PFMTx " { \n", i++, (GHT)arena);
195  rz_io_read_at(core->io, arena, (ut8 *)ar, sizeof(arena_t));
196  rz_io_read_at(core->io, (GHT)(size_t)ar->achunks.qlh_first, (ut8 *)head, sizeof(extent_node_t));
197  if (head->en_addr != 0) {
198  PRINT_YA(" Chunk - start: ");
199  PRINTF_BA("0x%08" PFMT64x, (ut64)(size_t)head->en_addr);
200  PRINT_YA(", end: ");
201  PRINTF_BA("0x%" PFMT64x, (ut64)(size_t)((char *)head->en_addr + cnksz));
202  PRINT_YA(", size: ");
203  PRINTF_BA("0x%08" PFMT64x "\n", (ut64)cnksz);
204  ut64 addr = (ut64)(size_t)head->ql_link.qre_next;
205  rz_io_read_at(core->io, addr, (ut8 *)node, sizeof(extent_node_t));
206  while (node && head && node->en_addr != head->en_addr) {
207  PRINT_YA(" Chunk - start: ");
208  PRINTF_BA("0x%08" PFMT64x, (ut64)(size_t)node->en_addr);
209  PRINT_YA(", end: ");
210  PRINTF_BA("0x%" PFMT64x, (ut64)(size_t)((char *)node->en_addr + cnksz));
211  PRINT_YA(", size: ");
212  PRINTF_BA("0x%" PFMT64x "\n", cnksz);
213  rz_io_read_at(core->io, (GHT)(size_t)node->ql_link.qre_next, (ut8 *)node, sizeof(extent_node_t));
214  }
215  }
216  PRINT_GA("}\n");
217  }
218  }
219  free(ar);
220  free(head);
221  free(node);
222  } break;
223  }
224 }
RZ_API ut64 rz_num_math(RzNum *num, const char *str)
Definition: unum.c:456
RzNum * num
Definition: rz_core.h:316
static int addr
Definition: z80asm.c:58

References addr, ar, arenas, rz_cons_t::context, free(), GH, GHT, GHT_MAX, test-lz4-versions::head, i, input(), rz_cons_context_t::pal, PFMT64x, PFMTx, PRINT_GA, PRINT_YA, PRINTF_BA, PRINTF_GA, rz_cons_singleton(), rz_io_read_at(), RZ_LOG_ERROR, RZ_NEW0, rz_num_math(), rz_resolve_jemalloc(), and ut64().

Referenced by cmd_dbg_map_jemalloc().

◆ jemalloc_print_narenas()

static void GH() jemalloc_print_narenas ( RzCore core,
const char *  input 
)
static

Definition at line 226 of file linux_heap_jemalloc.c.

226  {
227  ut64 symaddr;
228  ut64 arenas;
229  GHT arena = GHT_MAX;
230  arena_t *ar = RZ_NEW0(arena_t);
231  if (!ar) {
232  return;
233  }
234  arena_stats_t *stats = RZ_NEW0(arena_stats_t);
235  if (!stats) {
236  free(ar);
237  return;
238  }
239  int i = 0;
240  GHT narenas = 0;
242 
243  switch (input[0]) {
244  case '\0':
245  if (GH(rz_resolve_jemalloc)(core, "narenas_total", &symaddr)) {
246  rz_io_read_at(core->io, symaddr, (ut8 *)&narenas, sizeof(GHT));
247  PRINTF_GA("narenas : %" PFMT64d "\n", (ut64)narenas);
248  }
249  if (narenas == 0) {
250  RZ_LOG_ERROR("No arenas allocated.\n");
251  free(stats);
252  free(ar);
253  return;
254  }
255  if (narenas == GHT_MAX) {
256  RZ_LOG_ERROR("Cannot find narenas_total\n");
257  free(stats);
258  free(ar);
259  return;
260  }
261 
262  if (GH(rz_resolve_jemalloc)(core, "je_arenas", &arenas)) {
263  rz_io_read_at(core->io, arenas, (ut8 *)&arenas, sizeof(GHT));
264  PRINTF_GA("arenas[%" PFMT64d "] @ 0x%" PFMT64x " {\n", (ut64)narenas, (ut64)arenas);
265  for (i = 0; i < narenas; i++) {
266  ut64 at = arenas + (i * sizeof(GHT));
267  rz_io_read_at(core->io, at, (ut8 *)&arena, sizeof(GHT));
268  if (!arena) {
269  PRINTF_YA(" arenas[%d]: (empty)\n", i);
270  continue;
271  }
272  PRINTF_YA(" arenas[%d]: ", i);
273  PRINTF_BA("@ 0x%" PFMT64x "\n", at);
274  }
275  }
276  PRINT_GA("}\n");
277  break;
278  case ' ':
279  arena = rz_num_math(core->num, input + 1);
280  rz_io_read_at(core->io, (GHT)arena, (ut8 *)ar, sizeof(arena_t));
281 
282  PRINT_GA("struct arena_s {\n");
283 #define OO(x) (ut64)(arena + rz_offsetof(arena_t, x))
284  PRINTF_BA(" ind = 0x%x\n", ar->ind);
285  PRINTF_BA(" nthreads: application allocation = 0x%" PFMT64x "\n", (ut64)ar->nthreads[0]);
286  PRINTF_BA(" nthreads: internal metadata allocation = 0x%" PFMT64x "\n", (ut64)ar->nthreads[1]);
287  PRINTF_BA(" lock = 0x%" PFMT64x "\n", OO(lock));
288  PRINTF_BA(" stats = 0x%" PFMT64x "\n", OO(stats));
289  PRINTF_BA(" tcache_ql = 0x%" PFMT64x "\n", OO(tcache_ql));
290  PRINTF_BA(" prof_accumbytes = 0x%" PFMT64x "x\n", (ut64)ar->prof_accumbytes);
291  PRINTF_BA(" offset_state = 0x%" PFMT64x "\n", (ut64)ar->offset_state);
292  PRINTF_BA(" dss_prec_t = 0x%" PFMT64x "\n", OO(dss_prec));
293  PRINTF_BA(" achunks = 0x%" PFMT64x "\n", OO(achunks));
294  PRINTF_BA(" extent_sn_next = 0x%" PFMT64x "\n", (ut64)(size_t)ar->extent_sn_next);
295  PRINTF_BA(" spare = 0x%" PFMT64x "\n", (ut64)(size_t)ar->spare);
296  PRINTF_BA(" lg_dirty_mult = 0x%" PFMT64x "\n", (ut64)(ssize_t)ar->lg_dirty_mult);
297  PRINTF_BA(" purging = %s\n", rz_str_bool(ar->purging));
298  PRINTF_BA(" nactive = 0x%" PFMT64x "\n", (ut64)(size_t)ar->nactive);
299  PRINTF_BA(" ndirty = 0x%" PFMT64x "\n", (ut64)(size_t)ar->ndirty);
300 
301  PRINTF_BA(" runs_dirty = 0x%" PFMT64x "\n", OO(runs_dirty));
302  PRINTF_BA(" chunks_cache = 0x%" PFMT64x "\n", OO(chunks_cache));
303  PRINTF_BA(" huge = 0x%" PFMT64x "\n", OO(huge));
304  PRINTF_BA(" huge_mtx = 0x%" PFMT64x "\n", OO(huge_mtx));
305 
306  PRINTF_BA(" chunks_szsnad_cached = 0x%" PFMT64x "\n", OO(chunks_szsnad_cached));
307  PRINTF_BA(" chunks_ad_cached = 0x%" PFMT64x "\n", OO(chunks_ad_cached));
308  PRINTF_BA(" chunks_szsnad_retained = 0x%" PFMT64x "\n", OO(chunks_szsnad_retained));
309  PRINTF_BA(" chunks_ad_cached = 0x%" PFMT64x "\n", OO(chunks_ad_retained));
310 
311  PRINTF_BA(" chunks_mtx = 0x%" PFMT64x "\n", OO(chunks_mtx));
312  PRINTF_BA(" node_cache = 0x%" PFMT64x "\n", OO(node_cache));
313  PRINTF_BA(" node_cache_mtx = 0x%" PFMT64x "\n", OO(node_cache_mtx));
314  PRINTF_BA(" chunks_hooks = 0x%" PFMT64x "\n", OO(chunk_hooks));
315  PRINTF_BA(" bins = %d 0x%" PFMT64x "\n", JM_NBINS, OO(bins));
316  PRINTF_BA(" runs_avail = %d 0x%" PFMT64x "\n", NPSIZES, OO(runs_avail));
317  PRINT_GA("}\n");
318  break;
319  }
320  free(ar);
321  free(stats);
322 }
#define OO(x)
RZ_API const char * rz_str_bool(int b)
Definition: str.c:3896
#define PFMT64d
Definition: rz_types.h:394
int ssize_t
Definition: sftypes.h:39
static void lock(volatile int *lk)
Definition: malloc.c:61
struct bin bins[64]
Definition: malloc.c:34

References ar, arenas, bins, rz_cons_t::context, free(), GH, GHT, GHT_MAX, i, input(), lock(), OO, rz_cons_context_t::pal, PFMT64d, PFMT64x, PRINT_GA, PRINTF_BA, PRINTF_GA, PRINTF_YA, rz_cons_singleton(), rz_io_read_at(), RZ_LOG_ERROR, RZ_NEW0, rz_num_math(), rz_resolve_jemalloc(), rz_str_bool(), and ut64().

Referenced by cmd_dbg_map_jemalloc().

◆ rz_resolve_jemalloc()

static bool GH() rz_resolve_jemalloc ( RzCore core,
char *  symname,
ut64 symbol 
)
static

Definition at line 67 of file linux_heap_jemalloc.c.

67  {
69  RzDebugMap *map;
70  const char *jemalloc_ver_end = NULL;
71  ut64 jemalloc_addr = UT64_MAX;
72 
73  if (!core || !core->dbg || !core->dbg->maps) {
74  return false;
75  }
76  rz_debug_map_sync(core->dbg);
77  rz_list_foreach (core->dbg->maps, iter, map) {
78  if (strstr(map->name, "libjemalloc.")) {
79  jemalloc_addr = map->addr;
80  jemalloc_ver_end = map->name;
81  break;
82  }
83  }
84  if (!jemalloc_ver_end) {
85  RZ_LOG_WARN("Is jemalloc mapped in memory? (see dm command)\n");
86  return false;
87  }
88 #if __linux__
89  bool is_debug_file = GH(je_matched)(jemalloc_ver_end, "/usr/local/lib");
90 
91  if (!is_debug_file) {
92  RZ_LOG_WARN("Is libjemalloc.so.2 in /usr/local/lib path?\n");
93  return false;
94  }
95  char *path = rz_str_newf("%s", jemalloc_ver_end);
96  if (rz_file_exists(path)) {
97  ut64 vaddr = GH(je_get_va_symbol)(core, path, symname);
98  if (jemalloc_addr != GHT_MAX && vaddr != 0) {
99  *symbol = jemalloc_addr + vaddr;
100  free(path);
101  return true;
102  }
103  }
104  free(path);
105  return false;
106 #else
107  (void)jemalloc_addr;
108  RZ_LOG_INFO("Resolving %s from libjemalloc.2... ", symname);
109  // this is quite sloooow, we must optimize dmi
110  char *va = rz_core_cmd_strf(core, "dmi libjemalloc.2 %s$~[1]", symname);
111  ut64 n = rz_num_get(NULL, va);
112  if (n && n != UT64_MAX) {
113  *symbol = n;
114  rz_cons_printf("0x%08" PFMT64x "\n", n);
115  } else {
116  rz_cons_printf("NOT FOUND\n");
117  }
118  free(va);
119  return true;
120 #endif
121 }
RZ_API char * rz_core_cmd_strf(RzCore *core, const char *fmt,...)
Definition: cmd.c:5472
RZ_API int rz_cons_printf(const char *format,...)
Definition: cons.c:1202
static static fork const void static count static fd const char const char static newpath const char static path const char path
Definition: sflib.h:35
RZ_API bool rz_debug_map_sync(RzDebug *dbg)
Definition: dmap.c:33
size_t map(int syms, int left, int len)
Definition: enough.c:237
int n
Definition: mipsasm.c:19
RZ_API bool rz_file_exists(const char *str)
Definition: file.c:192
#define RZ_LOG_INFO(fmtstr,...)
Definition: rz_log.h:54
#define RZ_LOG_WARN(fmtstr,...)
Definition: rz_log.h:56
RZ_API ut64 rz_num_get(RzNum *num, const char *str)
Definition: unum.c:172
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
#define UT64_MAX
Definition: rz_types_base.h:86
RzDebug * dbg
Definition: rz_core.h:329
RzList * maps
Definition: rz_debug.h:306

References free(), GH, GHT_MAX, map(), n, NULL, path, PFMT64x, rz_cons_printf(), rz_core_cmd_strf(), rz_debug_map_sync(), rz_file_exists(), RZ_LOG_INFO, RZ_LOG_WARN, rz_num_get(), rz_str_newf(), ut64(), and UT64_MAX.

Referenced by jemalloc_get_bins(), jemalloc_get_chunks(), and jemalloc_print_narenas().