Rizin
unix-like reverse engineering framework and cli tools
enough.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <stdint.h>
#include <assert.h>

Go to the source code of this file.

Classes

struct  tab
 
struct  string_t
 

Macros

#define local   static
 
#define PRIbig   "ju"
 

Typedefs

typedef uintmax_t big_t
 
typedef uintmax_t code_t
 

Functions

void string_clear (string_t *s)
 
void string_init (string_t *s)
 
void string_free (string_t *s)
 
void string_printf (string_t *s, char *fmt,...)
 
size_t map (int syms, int left, int len)
 
void cleanup (void)
 
big_t count (int syms, int left, int len)
 
int been_here (int syms, int left, int len, int mem, int rem)
 
void examine (int syms, int left, int len, int mem, int rem)
 
void enough (int syms)
 
int main (int argc, char **argv)
 

Variables

struct {
   int   max
 
   int   root
 
   int   large
 
   size_t   size
 
   big_t   tot
 
   string_t   out
 
   int *   code
 
   big_t *   num
 
   struct tab *   done
 
g
 

Macro Definition Documentation

◆ local

#define local   static

Definition at line 112 of file enough.c.

◆ PRIbig

#define PRIbig   "ju"

Definition at line 116 of file enough.c.

Typedef Documentation

◆ big_t

typedef uintmax_t big_t

Definition at line 115 of file enough.c.

◆ code_t

typedef uintmax_t code_t

Definition at line 117 of file enough.c.

Function Documentation

◆ been_here()

int been_here ( int  syms,
int  left,
int  len,
int  mem,
int  rem 
)

Definition at line 308 of file enough.c.

308  {
309  // point to vector for (syms,left,len), bit in vector for (mem,rem)
310  size_t index = map(syms, left, len);
311  mem -= 1 << g.root; // mem always includes the root table
312  mem >>= 1; // mem and rem are always even
313  rem >>= 1;
314  size_t offset = (mem >> 3) + rem;
315  offset = ((offset * (offset + 1)) >> 1) + rem;
316  int bit = 1 << (mem & 7);
317 
318  // see if we've been here
319  size_t length = g.done[index].len;
320  if (offset < length && (g.done[index].vec[offset] & bit) != 0)
321  return 1; // done this!
322 
323  // we haven't been here before -- set the bit to show we have now
324 
325  // see if we need to lengthen the vector in order to set the bit
326  if (length <= offset) {
327  // if we have one already, enlarge it, zero out the appended space
328  char *vector;
329  if (length) {
330  do {
331  length <<= 1;
332  } while (length <= offset);
333  vector = realloc(g.done[index].vec, length);
334  assert(vector != NULL && "out of memory");
335  memset(vector + g.done[index].len, 0, length - g.done[index].len);
336  }
337 
338  // otherwise we need to make a new vector and zero it out
339  else {
340  length = 16;
341  while (length <= offset)
342  length <<= 1;
343  vector = calloc(length, 1);
344  assert(vector != NULL && "out of memory");
345  }
346 
347  // install the new vector
348  g.done[index].len = length;
349  g.done[index].vec = vector;
350  }
351 
352  // set the bit
353  g.done[index].vec[offset] |= bit;
354  return 0;
355 }
size_t len
Definition: 6502dis.c:15
#define NULL
Definition: cris-opc.c:27
RzCryptoSelector bit
Definition: crypto.c:16
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec vector
Definition: sflib.h:82
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
Definition: sflib.h:133
struct @667 g
size_t map(int syms, int left, int len)
Definition: enough.c:237
voidpf uLong offset
Definition: ioapi.h:144
return memset(p, 0, total)
void * mem
Definition: libc.cpp:91
void * realloc(void *ptr, size_t size)
Definition: malloc.c:144
void * calloc(size_t number, size_t size)
Definition: malloc.c:102
assert(limit<=UINT32_MAX/2)

References assert(), bit, calloc(), g, len, length, map(), mem, memset(), NULL, realloc(), and vector.

Referenced by examine().

◆ cleanup()

void cleanup ( void  )

Definition at line 244 of file enough.c.

244  {
245  if (g.done != NULL) {
246  for (size_t n = 0; n < g.size; n++)
247  if (g.done[n].len)
248  free(g.done[n].vec);
249  g.size = 0;
250  free(g.done); g.done = NULL;
251  }
252  free(g.num); g.num = NULL;
253  free(g.code); g.code = NULL;
254  string_free(&g.out);
255 }
void string_free(string_t *s)
Definition: enough.c:195
RZ_API void Ht_() free(HtName_(Ht) *ht)
Definition: ht_inc.c:130
int n
Definition: mipsasm.c:19

References free(), g, n, NULL, and string_free().

Referenced by anop_esil(), cmd_print_blocks(), fs__scandir(), get_bbnodes(), lang_pipe_run(), main(), parse_enumerate(), parse_enumerator(), parse_function(), parse_info_raw(), parse_struct_member(), parse_typedef(), parse_union_member(), print_diff(), rebase_info_populate(), rip(), rz_analysis_function_args(), rz_core_visual_analysis_classes(), sections_print_table(), uv__pipe_getname(), uv_interface_addresses(), xnu_generate_corefile(), and xnu_write_mem_maps_to_buffer().

◆ count()

big_t count ( int  syms,
int  left,
int  len 
)

Definition at line 261 of file enough.c.

261  {
262  // see if only one possible code
263  if (syms == left)
264  return 1;
265 
266  // note and verify the expected state
267  assert(syms > left && left > 0 && len < g.max);
268 
269  // see if we've done this one already
270  size_t index = map(syms, left, len);
271  big_t got = g.num[index];
272  if (got)
273  return got; // we have -- return the saved result
274 
275  // we need to use at least this many bit patterns so that the code won't be
276  // incomplete at the next length (more bit patterns than symbols)
277  int least = (left << 1) - syms;
278  if (least < 0)
279  least = 0;
280 
281  // we can use at most this many bit patterns, lest there not be enough
282  // available for the remaining symbols at the maximum length (if there were
283  // no limit to the code length, this would become: most = left - 1)
284  int most = (((code_t)left << (g.max - len)) - syms) /
285  (((code_t)1 << (g.max - len)) - 1);
286 
287  // count all possible codes from this juncture and add them up
288  big_t sum = 0;
289  for (int use = least; use <= most; use++) {
290  got = count(syms - use, (left - use) << 1, len + 1);
291  sum += got;
292  if (got == (big_t)-1 || sum < got) // overflow
293  return (big_t)-1;
294  }
295 
296  // verify that all recursive calls are productive
297  assert(sum != 0);
298 
299  // save the result and return it
300  g.num[index] = sum;
301  return sum;
302 }
uintmax_t big_t
Definition: enough.c:115
big_t count(int syms, int left, int len)
Definition: enough.c:261
uintmax_t code_t
Definition: enough.c:117

References assert(), g, len, and map().

Referenced by main().

◆ enough()

void enough ( int  syms)

Definition at line 454 of file enough.c.

454  {
455  // clear code
456  for (int n = 0; n <= g.max; n++)
457  g.code[n] = 0;
458 
459  // look at all (root + 1) bit and longer codes
460  string_clear(&g.out); // empty saved results
461  g.large = 1 << g.root; // base table
462  if (g.root < g.max) // otherwise, there's only a base table
463  for (int n = 3; n <= syms; n++)
464  for (int left = 2; left < n; left += 2) {
465  // look at all reachable (root + 1) bit nodes, and the
466  // resulting codes (complete at root + 2 or more)
467  size_t index = map(n, left, g.root + 1);
468  if (g.root + 1 < g.max && g.num[index]) // reachable node
469  examine(n, left, g.root + 1, 1 << g.root, 0);
470 
471  // also look at root bit codes with completions at root + 1
472  // bits (not saved in num, since complete), just in case
473  if (g.num[index - 1] && n <= left << 1)
474  examine((n - left) << 1, (n - left) << 1, g.root + 1,
475  1 << g.root, 0);
476  }
477 
478  // done
479  printf("maximum of %d table entries for root = %d\n", g.large, g.root);
480  fputs(g.out.str, stdout);
481 }
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
Definition: cs_driver.c:93
void examine(int syms, int left, int len, int mem, int rem)
Definition: enough.c:361
void string_clear(string_t *s)
Definition: enough.c:181

References examine(), g, map(), n, printf(), and string_clear().

Referenced by main().

◆ examine()

void examine ( int  syms,
int  left,
int  len,
int  mem,
int  rem 
)

Definition at line 361 of file enough.c.

361  {
362  // see if we have a complete code
363  if (syms == left) {
364  // set the last code entry
365  g.code[len] = left;
366 
367  // complete computation of memory used by this code
368  while (rem < left) {
369  left -= rem;
370  rem = 1 << (len - g.root);
371  mem += rem;
372  }
373  assert(rem == left);
374 
375  // if this is at the maximum, show the sub-code
376  if (mem >= g.large) {
377  // if this is a new maximum, update the maximum and clear out the
378  // printed sub-codes from the previous maximum
379  if (mem > g.large) {
380  g.large = mem;
381  string_clear(&g.out);
382  }
383 
384  // compute the starting state for this sub-code
385  syms = 0;
386  left = 1 << g.max;
387  for (int bits = g.max; bits > g.root; bits--) {
388  syms += g.code[bits];
389  left -= g.code[bits];
390  assert((left & 1) == 0);
391  left >>= 1;
392  }
393 
394  // print the starting state and the resulting sub-code to g.out
395  string_printf(&g.out, "<%u, %u, %u>:",
396  syms, g.root + 1, ((1 << g.root) - left) << 1);
397  for (int bits = g.root + 1; bits <= g.max; bits++)
398  if (g.code[bits])
399  string_printf(&g.out, " %d[%d]", g.code[bits], bits);
400  string_printf(&g.out, "\n");
401  }
402 
403  // remove entries as we drop back down in the recursion
404  g.code[len] = 0;
405  return;
406  }
407 
408  // prune the tree if we can
409  if (been_here(syms, left, len, mem, rem))
410  return;
411 
412  // we need to use at least this many bit patterns so that the code won't be
413  // incomplete at the next length (more bit patterns than symbols)
414  int least = (left << 1) - syms;
415  if (least < 0)
416  least = 0;
417 
418  // we can use at most this many bit patterns, lest there not be enough
419  // available for the remaining symbols at the maximum length (if there were
420  // no limit to the code length, this would become: most = left - 1)
421  int most = (((code_t)left << (g.max - len)) - syms) /
422  (((code_t)1 << (g.max - len)) - 1);
423 
424  // occupy least table spaces, creating new sub-tables as needed
425  int use = least;
426  while (rem < use) {
427  use -= rem;
428  rem = 1 << (len - g.root);
429  mem += rem;
430  }
431  rem -= use;
432 
433  // examine codes from here, updating table space as we go
434  for (use = least; use <= most; use++) {
435  g.code[len] = use;
436  examine(syms - use, (left - use) << 1, len + 1,
437  mem + (rem ? 1 << (len - g.root) : 0), rem << 1);
438  if (rem == 0) {
439  rem = 1 << (len - g.root);
440  mem += rem;
441  }
442  rem--;
443  }
444 
445  // remove entries as we drop back down in the recursion
446  g.code[len] = 0;
447 }
int bits(struct state *s, int need)
Definition: blast.c:72
void string_printf(string_t *s, char *fmt,...)
Definition: enough.c:204
int been_here(int syms, int left, int len, int mem, int rem)
Definition: enough.c:308

References assert(), been_here(), bits(), g, len, mem, string_clear(), and string_printf().

Referenced by enough().

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 498 of file enough.c.

498  {
499  // set up globals for cleanup()
500  g.code = NULL;
501  g.num = NULL;
502  g.done = NULL;
503  string_init(&g.out);
504 
505  // get arguments -- default to the deflate literal/length code
506  int syms = 286;
507  g.root = 9;
508  g.max = 15;
509  if (argc > 1) {
510  syms = atoi(argv[1]);
511  if (argc > 2) {
512  g.root = atoi(argv[2]);
513  if (argc > 3)
514  g.max = atoi(argv[3]);
515  }
516  }
517  if (argc > 4 || syms < 2 || g.root < 1 || g.max < 1) {
518  fputs("invalid arguments, need: [sym >= 2 [root >= 1 [max >= 1]]]\n",
519  stderr);
520  return 1;
521  }
522 
523  // if not restricting the code length, the longest is syms - 1
524  if (g.max > syms - 1)
525  g.max = syms - 1;
526 
527  // determine the number of bits in a code_t
528  int bits = 0;
529  for (code_t word = 1; word; word <<= 1)
530  bits++;
531 
532  // make sure that the calculation of most will not overflow
533  if (g.max > bits || (code_t)(syms - 2) >= ((code_t)-1 >> (g.max - 1))) {
534  fputs("abort: code length too long for internal types\n", stderr);
535  return 1;
536  }
537 
538  // reject impossible code requests
539  if ((code_t)(syms - 1) > ((code_t)1 << g.max) - 1) {
540  fprintf(stderr, "%d symbols cannot be coded in %d bits\n",
541  syms, g.max);
542  return 1;
543  }
544 
545  // allocate code vector
546  g.code = calloc(g.max + 1, sizeof(int));
547  assert(g.code != NULL && "out of memory");
548 
549  // determine size of saved results array, checking for overflows,
550  // allocate and clear the array (set all to zero with calloc())
551  if (syms == 2) // iff max == 1
552  g.num = NULL; // won't be saving any results
553  else {
554  g.size = syms >> 1;
555  int n = (syms - 1) >> 1;
556  assert(g.size <= (size_t)-1 / n && "overflow");
557  g.size *= n;
558  n = g.max - 1;
559  assert(g.size <= (size_t)-1 / n && "overflow");
560  g.size *= n;
561  g.num = calloc(g.size, sizeof(big_t));
562  assert(g.num != NULL && "out of memory");
563  }
564 
565  // count possible codes for all numbers of symbols, add up counts
566  big_t sum = 0;
567  for (int n = 2; n <= syms; n++) {
568  big_t got = count(n, 2, 1);
569  sum += got;
570  assert(got != (big_t)-1 && sum >= got && "overflow");
571  }
572  printf("%"PRIbig" total codes for 2 to %d symbols", sum, syms);
573  if (g.max < syms - 1)
574  printf(" (%d-bit length limit)\n", g.max);
575  else
576  puts(" (no length limit)");
577 
578  // allocate and clear done array for been_here()
579  if (syms == 2)
580  g.done = NULL;
581  else {
582  g.done = calloc(g.size, sizeof(struct tab));
583  assert(g.done != NULL && "out of memory");
584  }
585 
586  // find and show maximum inflate table usage
587  if (g.root > g.max) // reduce root to max length
588  g.root = g.max;
589  if ((code_t)syms < ((code_t)1 << (g.root + 1)))
590  enough(syms);
591  else
592  fputs("cannot handle minimum code lengths > root", stderr);
593 
594  // done
595  cleanup();
596  return 0;
597 }
#define PRIbig
Definition: enough.c:116
void enough(int syms)
Definition: enough.c:454
void string_init(string_t *s)
Definition: enough.c:187
void cleanup(void)
Definition: enough.c:244
static static fork const void static count static fd const char const char static newpath char char argv
Definition: sflib.h:40
Definition: enough.c:118

References argv, assert(), bits(), calloc(), cleanup(), count(), enough(), g, n, NULL, PRIbig, printf(), and string_init().

◆ map()

size_t map ( int  syms,
int  left,
int  len 
)
inline

Definition at line 237 of file enough.c.

237  {
238  return ((size_t)((syms - 1) >> 1) * ((syms - 2) >> 1) +
239  (left >> 1) - 1) * (g.max - 1) +
240  len - 1;
241 }

References g, and len.

Referenced by __core_analysis_fcn(), __core_cmd_search_asm_infinite(), __core_visual_gogo(), __io_maps(), add_map(), addroflib(), append_bound(), apply_maps_as_flags(), asciiart_backtrace(), basefind_create_pointer_map(), been_here(), bp_is_mapped(), bsd_native_sysctl_map(), canWrite(), cmd_debug_current_modules(), cmd_debug_modules(), cmd_print_bars(), cmd_print_blocks(), count(), DEFINE_HANDLE_TS_FCN_AND_SYMBOL(), do_analysis_search(), do_asm_search(), do_esil_search(), do_section_search(), do_string_search(), do_syscall_search(), ds_init(), dump_maps(), enough(), findMinMax(), get_base_from_maps(), get_brks(), get_closest_map(), get_esil_stack_name(), get_file_name_from_handle(), get_main_arena_with_symbol(), get_maps_unpatched(), GetHeapGlobalsOffset(), id2name(), io_create_mem_map(), io_map_calculate_skyline(), io_map_new(), is_tcache(), isValidAddress(), load_buffer(), map_del(), map_enum(), map_free(), maps(), meta_for_reloc(), moduleAt(), name2id(), num_callback(), on_map_skyline(), open_maps_list(), open_maps_show(), parse_namemap(), parse_options(), perform_mapped_file_yank(), populate_cache_maps(), print_cmd_analysis_after_traps_print(), print_debug_map_json(), print_debug_map_line(), print_debug_maps_ascii_art(), proc_mem_img(), run_basic_block_analysis(), rz_analysis_try_get_fcn(), rz_analyze_all_consecutive_functions_in_section_handler(), rz_bin_file_at(), rz_bin_map_free(), rz_bin_maps_of_file_sections(), rz_bin_object_get_map_at(), rz_bin_object_get_maps_at(), rz_bin_object_p2v_all(), rz_bin_object_sections_mapping_list(), rz_bin_relocs_patch_find_targets_map_base(), rz_bin_relocs_patch_maps(), rz_bin_sections_of_maps(), rz_cmd_debug_deallocate_map_handler(), rz_cmd_debug_dmi(), rz_cmd_debug_dml_handler(), rz_cmd_debug_dmS_handler(), rz_cmd_help(), rz_cmd_search(), rz_core_analysis_address(), rz_core_analysis_calls(), rz_core_analysis_code_count(), rz_core_analysis_coverage_count(), rz_core_analysis_esil_default(), rz_core_analysis_get_stats(), rz_core_analysis_hasrefs_to_depth(), rz_core_analysis_refs(), rz_core_analysis_value_pointers(), rz_core_bin_apply_maps(), rz_core_bin_sections_mapping_print(), rz_core_cmd_foreach3(), rz_core_debug_map_print(), rz_core_extend_at(), rz_core_file_close(), rz_core_file_io_map_deleted(), rz_core_file_open_load(), rz_core_get_boundaries_prot(), rz_core_get_section_name(), rz_core_io_file_reopen(), rz_core_pava(), rz_core_search_rop(), rz_core_visual_cmd(), rz_core_visual_title(), rz_debug_add_checkpoint(), rz_debug_bp_add(), rz_debug_dmp_init(), rz_debug_dmp_maps(), rz_debug_gdb_map_get(), rz_debug_gdb_modules_get(), rz_debug_get_baddr(), rz_debug_map_alloc(), rz_debug_map_clone(), rz_debug_map_dealloc(), rz_debug_map_free(), rz_debug_map_get(), rz_debug_map_new(), rz_debug_memory_permission_handler(), rz_debug_session_list_memory(), rz_debug_snap_map(), rz_debug_thread_list(), rz_debug_winkd_maps(), rz_heap_resolve_main_arena(), rz_io_desc_exchange(), rz_io_is_valid_offset(), rz_io_map_cleanup(), rz_io_map_del(), rz_io_map_del_for_fd(), rz_io_map_del_name(), rz_io_map_depriorize(), rz_io_map_exists(), rz_io_map_fini(), rz_io_map_get_for_fd(), rz_io_map_get_paddr(), rz_io_map_next_address(), rz_io_map_next_available(), rz_io_map_priorize(), rz_io_map_priorize_for_fd(), rz_io_map_remap(), rz_io_map_remap_fd(), rz_io_map_resize(), rz_io_map_resolve(), rz_io_map_set_name(), rz_io_open_at(), rz_io_p2v(), rz_io_v2p(), rz_main_rizin(), rz_open_maps_all_fd_handler(), rz_open_maps_flags_global_handler(), rz_open_maps_flags_handler(), rz_open_maps_list_ascii_handler(), rz_open_maps_list_cur_handler(), rz_open_maps_map_fd_handler(), rz_open_maps_map_handler(), rz_open_maps_name_del_handler(), rz_open_maps_name_handler(), rz_open_maps_name_id_del_handler(), rz_open_maps_name_id_handler(), rz_open_maps_prioritize_binid_handler(), rz_open_maps_relocate_current_handler(), rz_open_show_current_handler(), rz_resolve_jemalloc(), rz_seek_begin_handler(), rz_seek_end_handler(), rz_type_format_nulltermstring(), search_hash(), set_mod_inf(), make_dist_html::version(), windbg_map_get(), winkd_walk_vadtree(), and xnu_map_free().

◆ string_clear()

void string_clear ( string_t s)

Definition at line 181 of file enough.c.

181  {
182  s->str[0] = 0;
183  s->len = 0;
184 }
static RzSocket * s
Definition: rtr.c:28

References s.

Referenced by enough(), examine(), and string_init().

◆ string_free()

void string_free ( string_t s)

Definition at line 195 of file enough.c.

195  {
196  free(s->str);
197  s->str = NULL;
198  s->size = 0;
199  s->len = 0;
200 }

References free(), NULL, and s.

Referenced by cleanup().

◆ string_init()

void string_init ( string_t s)

Definition at line 187 of file enough.c.

187  {
188  s->size = 16;
189  s->str = malloc(s->size);
190  assert(s->str != NULL && "out of memory");
191  string_clear(s);
192 }
void * malloc(size_t size)
Definition: malloc.c:123

References assert(), malloc(), NULL, s, and string_clear().

Referenced by main().

◆ string_printf()

void string_printf ( string_t s,
char *  fmt,
  ... 
)

Definition at line 204 of file enough.c.

204  {
205  va_list ap;
206  va_start(ap, fmt);
207  size_t len = s->len;
208  int ret = vsnprintf(s->str + len, s->size - len, fmt, ap);
209  assert(ret >= 0 && "out of memory");
210  s->len += ret;
211  if (s->size < s->len + 1) {
212  do {
213  s->size <<= 1;
214  assert(s->size != 0 && "overflow");
215  } while (s->size < s->len + 1);
216  s->str = realloc(s->str, s->size);
217  assert(s->str != NULL && "out of memory");
218  vsnprintf(s->str + len, s->size - len, fmt, ap);
219  }
220  va_end(ap);
221 }
vsnprintf
Definition: kernel.h:366

References assert(), len, NULL, realloc(), s, and vsnprintf.

Referenced by examine().

Variable Documentation

◆ code

int* code ( void  )

Definition at line 231 of file enough.c.

◆ done

◆ 

struct { ... } g

Referenced by __approximate_rgb(), __lookup_rgb(), __unrgb(), _qnxr_remove_bp(), _qnxr_set_bp(), _resolve_arch(), _server_handle_c(), _server_handle_exec_file_read(), _server_handle_g(), _server_handle_Hc(), _server_handle_Hg(), _server_handle_k(), _server_handle_M(), _server_handle_m(), _server_handle_p(), _server_handle_P(), _server_handle_qAttached(), _server_handle_qC(), _server_handle_qfThreadInfo(), _server_handle_qOffsets(), _server_handle_qsThreadInfo(), _server_handle_qSupported(), _server_handle_qTfV(), _server_handle_qTStatus(), _server_handle_ques(), _server_handle_s(), _server_handle_vCont(), _server_handle_vKill(), _server_handle_vMustReplyEmpty(), _server_handle_z(), adjust_class(), adjust_class_val(), adjust_directions(), agraph_follow_false(), agraph_follow_innodes(), agraph_follow_true(), agraph_get_title(), agraph_init(), agraph_next_node(), agraph_prev_node(), agraph_print(), agraph_print_edges(), agraph_print_edges_simple(), agraph_print_node(), agraph_print_nodes(), agraph_refresh(), agraph_reload_nodes(), agraph_sdb_init(), agraph_set_layout(), agraph_set_zoom(), agraph_toggle_callgraph(), agraph_toggle_mini(), agraph_toggle_speed(), agraph_toggle_tiny(), agraph_update_seek(), agraph_update_title(), append(), append_shortcut(), assign_layers(), backedge_info(), backref(), been_here(), bfvm_trace_op(), categorize(), check_changes(), cleanup(), clusterProcessGossipSection(), cmd_print_gadget(), collect_changes(), combine_sequences(), compute_classes(), compute_pos(), compute_vertical_nodes(), count(), count_edges(), create_dummy_nodes(), create_layers(), decode_bits(), delete_dup_edges(), dem_str_replace(), dfs_node(), dissect(), dist_nodes(), dot_trace_discover_child(), drx_get_at(), drx_list(), emit_branch(), enough(), examine(), find_autocmplt_type_at_stmt(), find_autocmplt_type_at_stmt_op(), find_autocmplt_type_newcmd_or_arg(), find_autocmplt_type_quoted_arg(), find_near_of(), findmust(), fix_back_edge_dummy_nodes(), fold_asm_trace(), follow_nth(), gdbr_attach(), gdbr_break_process(), gdbr_check_extended_mode(), gdbr_check_vcont(), gdbr_cleanup(), gdbr_close_file(), gdbr_connect(), gdbr_connect_lldb(), gdbr_continue(), gdbr_detach(), gdbr_detach_pid(), gdbr_disconnect(), gdbr_exec_file_read(), gdbr_get_baddr(), gdbr_init(), gdbr_is_thread_dead(), gdbr_kill(), gdbr_kill_pid(), gdbr_lock_enter(), gdbr_lock_leave(), gdbr_lock_tryenter(), gdbr_open_file(), gdbr_parse_processes_xml(), gdbr_parse_target_xml(), gdbr_pids_list(), gdbr_read_feature(), gdbr_read_file(), gdbr_read_memory(), gdbr_read_memory_page(), gdbr_read_osdata(), gdbr_read_processes_xml(), gdbr_read_registers(), gdbr_read_registers_lldb(), gdbr_read_target_xml(), gdbr_remove_bp(), gdbr_remove_hwa(), gdbr_remove_hwbp(), gdbr_remove_hwr(), gdbr_remove_hww(), gdbr_select(), gdbr_send_qRcmd(), gdbr_server_serve(), gdbr_set_architecture(), gdbr_set_bp(), gdbr_set_hwa(), gdbr_set_hwbp(), gdbr_set_hwr(), gdbr_set_hww(), gdbr_set_reg_profile(), gdbr_step(), gdbr_stop_reason(), gdbr_threads_list(), gdbr_write_bin_registers(), gdbr_write_memory(), gdbr_write_reg(), gdbr_write_register(), gdbr_write_registers(), get_bbnodes(), get_bbupdate(), get_cgnodes(), get_crossing_matrix(), get_edge_number(), get_graph_string(), get_graphtrace_node(), get_right_dummy(), get_sibling(), gethtmlrgb(), goto_asmqjmps(), graph_single_step_in(), graph_single_step_over(), graphNodeMove(), guess_data_free(), guess_next_autocmplt_token(), handle_attach(), handle_cont(), handle_g(), handle_G(), handle_lldb_read_reg(), handle_m(), handle_M(), handle_P(), handle_qC(), handle_qStatus(), handle_qSupported(), handle_removebp(), handle_setbp(), handle_stop_reason(), handle_vFile_close(), handle_vFile_open(), handle_vFile_pread(), init_color_table(), is_comments(), is_mini(), is_offset(), is_reversed(), is_summary(), is_tiny(), is_valid_pos(), isinsets(), iter_set_info(), layer_sweep(), main(), map(), matcher(), mini_RzANode_print(), minimize_crossings(), mode2opts(), move_current_node(), nextword(), normal_RzANode_print(), nto_parse_notify(), nto_send(), nto_send_arg(), nto_send_env(), nto_send_init(), original_traverse_l(), p_simp_re(), pack(), place_dummies(), place_nodes(), place_nodes_val(), place_original(), place_sequence(), place_single(), pluscount(), print_double_linked_list_bin_graph(), qnxr_attach(), qnxr_cleanup(), qnxr_connect(), qnxr_continue(), qnxr_disconnect(), qnxr_init(), qnxr_pidlist(), qnxr_read_memory(), qnxr_read_packet(), qnxr_read_registers(), qnxr_remove_bp(), qnxr_remove_hwbp(), qnxr_run(), qnxr_select(), qnxr_send_ch_debug(), qnxr_send_ch_reset(), qnxr_send_ch_text(), qnxr_send_nak(), qnxr_send_packet(), qnxr_send_vcont(), qnxr_set_architecture(), qnxr_set_bp(), qnxr_set_hwbp(), qnxr_step(), qnxr_stop(), qnxr_wait(), qnxr_write_memory(), qnxr_write_reg(), qnxr_write_register(), rcc_context(), read_packet(), rebase(), reg_cache_init(), reload_nodes(), remove_bp(), remove_cycles(), rgb(), run_f_list(), rz_agraph_add_edge(), rz_agraph_add_edge_at(), rz_agraph_add_node(), rz_agraph_add_node_with_color(), rz_agraph_del_edge(), rz_agraph_del_node(), rz_agraph_foreach(), rz_agraph_foreach_edge(), rz_agraph_free(), rz_agraph_get_first_node(), rz_agraph_get_node(), rz_agraph_get_sdb(), rz_agraph_new(), rz_agraph_print(), rz_agraph_print_json(), rz_agraph_reset(), rz_agraph_set_curnode(), rz_agraph_set_title(), rz_cmd_heap_chunks_print_handler(), rz_cmd_print_gadget_add_handler(), rz_cmd_print_gadget_move_handler(), rz_cmd_print_gadget_print_as_rizin_handler(), rz_cons_color(), rz_cons_pal_show_256(), rz_cons_rgb_gen(), rz_cons_rgb_parse(), rz_cons_rgb_tostring(), rz_core_gadget_free(), rz_core_gadget_print(), rz_core_meta_print(), rz_core_rtr_gdb_cb(), rz_core_rtr_gdb_run(), rz_core_visual_graph(), rz_debug_bochs_attach(), rz_debug_drx_set(), rz_debug_gdb_attach(), rz_debug_qnx_attach(), rz_graph_adjacent(), rz_graph_dfs(), rz_graph_dfs_node(), rz_graph_dfs_node_reverse(), rz_graph_get_nodes(), rz_graph_node_split_forward(), rz_rbtree_aug_delete(), rz_rbtree_aug_insert(), rz_regex_comp(), rz_regex_exec(), rz_regex_fini(), rz_str_replace(), rz_str_replace_icase(), rz_str_replace_in(), rz_str_replace_thunked(), samesets(), send_ack(), send_msg(), send_packet(), send_vcont(), set_bp(), set_dist_nodes(), set_layer_gap(), set_layout(), SHA256_Transform(), SHA512_Transform(), step(), stop_reason_exit(), stop_reason_terminated(), stripsnug(), test_command(), unpack(), update_graph_sizes(), update_node_dimension(), user_edge_cb(), and view_cyclic_edge().

◆ large

int large

Definition at line 227 of file enough.c.

◆ max

int max

Definition at line 225 of file enough.c.

Referenced by __handle_tab(), _zip_checkcons(), annotated_hexdump(), arr_exist(), arr_exist8(), backedge_info(), bsd_thread_list(), buf_sparse_read(), buf_sparse_seek(), buf_sparse_size(), clusterAcceptHandler(), clusterGetMaxEpoch(), cmd_print_eq_dict(), compress2(), consume_init_expr_r(), consume_limits_r(), consume_locals_r(), consume_r(), consume_s7_r(), consume_str_r(), consume_u1_r(), consume_u32_r(), consume_u7_r(), findClassBounds(), findMethodBounds(), findMinMax(), flagbar_foreach(), FUZZ_dataProducer_range32(), FUZZ_getRange_from_uint32(), FUZZ_rand32(), get_args_offset(), get_entries_from_section(), gz_comp(), gz_load(), HEAP_EXPORT(), id2name(), inflate_table(), inflate_table9(), insn_find(), list_count(), log_compress(), lunpipe(), lzma_mt_block_size(), mpc_err_string(), name2id(), parse_code_entry(), parse_custom_name_entry(), parse_data_entry(), parse_element_entry(), parse_export_entry(), parse_global_entry(), parse_import_entry(), parse_memory_entry(), parse_namemap(), parse_options(), parse_table_entry(), parse_type_entry(), print_debug_maps_ascii_art(), read_i32_leb128(), read_i64_leb128(), read_u32_leb128(), read_u64_leb128(), rz_bin_relocs_patch_find_targets_map_base(), rz_bin_wasm_get_custom_name_entries(), rz_bin_wasm_get_sections(), rz_bin_wasm_get_start(), rz_cmd_search(), rz_coff_get_reloc_targets_map_base(), rz_core_analysis_fcn_merge(), rz_core_visual_cmd(), rz_num_rand(), rz_print_rangebar(), rz_search_privkey_update(), rz_search_set_string_limits(), rz_table_visual_list(), saturate_signed(), saturate_signed_to_range(), saturate_unsigned(), sparse_limits(), str_to_uint64(), TAG_CALLBACK(), type_match(), and uncompress2().

◆ num

big_t* num

Definition at line 232 of file enough.c.

◆ out

string_t out

Definition at line 230 of file enough.c.

◆ root

◆ size

Definition at line 228 of file enough.c.

◆ tot

big_t tot

Definition at line 229 of file enough.c.

Referenced by gzcopy(), gzinit(), gzscan(), and main().