#include <stdlib.h>
#include <string.h>
#include "global.h"
#include "htdata.h"
Go to the source code of this file.
Defines | |
#define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
#define | MAX(a, b) ((a) > (b) ? (a) : (b)) |
#define | UNALIGNED_MOVE(a, b) (a) = (b) |
#define | UNALIGNED_MOVE_CONST(a, b, type) (a) = (b) |
#define | OUT_OF_MEMORY_FAIL 0 |
#define | OUT_OF_MEMORY_IGNORE 1 |
#define | OUT_OF_MEMORY_RETRY 2 |
Functions | |
dword | delinearize (dword d) |
int | compare_keys_int_delinear (Object *key_a, Object *key_b) |
int | compare_keys_uint_delinear (Object *key_a, Object *key_b) |
int * | random_permutation (int max) |
double | calc_entropy (byte *buf, int size) |
int | calc_entropy2 (byte *buf, int size) |
int | out_of_memory (int size) |
void * | smalloc (size_t size) |
void * | smalloc0 (size_t size) |
Variables | |
int(* | out_of_memory_func )(int size) |
|
|
|
|
|
Definition at line 54 of file tools.h. Referenced by app_out_of_memory_proc(), and out_of_memory(). |
|
Definition at line 55 of file tools.h. Referenced by smalloc(), and smalloc0(). |
|
Definition at line 56 of file tools.h. Referenced by app_out_of_memory_proc(), smalloc(), and smalloc0(). |
|
|
Definition at line 41 of file tools.h. Referenced by tag_make_default_color(). |
|
Definition at line 75 of file tools.cc. References buf, LN2, and size. Referenced by ht_linear_func_entropy2(). |
|
Definition at line 99 of file tools.cc. References buf, byte, and size. Referenced by ht_hex_viewer::handlemsg(), and ht_linear_func_entropy(). |
|
Definition at line 34 of file tools.cc. References delinearize(), and value. |
|
Definition at line 42 of file tools.cc. References delinearize(), UINT, and value. |
|
Definition at line 29 of file tools.cc. References dword. Referenced by compare_keys_file_delinear(), compare_keys_info_pos_delinear(), compare_keys_int_delinear(), compare_keys_uint_delinear(), AddressX86_1616::compareDelinear(), AddressX86_1632::compareDelinear(), AddressX86Flat32::compareDelinear(), AddressFlat64::compareDelinear(), and AddressFlat32::compareDelinear(). |
|
Definition at line 148 of file tools.cc. References OUT_OF_MEMORY_FAIL. Referenced by done_app(). |
|
Definition at line 50 of file tools.cc. References NULL, and smalloc(). Referenced by XBEAnalyser::beginAnalysis(), PEAnalyser::beginAnalysis(), NEAnalyser::beginAnalysis(), MachoAnalyser::beginAnalysis(), and ElfAnalyser::initInsertSymbols(). |
|
|
Definition at line 172 of file tools.cc. References malloc(), NULL, out_of_memory_func, OUT_OF_MEMORY_IGNORE, OUT_OF_MEMORY_RETRY, and size. Referenced by Analyser::newLocation(), and Analyser::newSymbol(). |
|
Definition at line 57 of file tools.h. Referenced by done_app(), init_app(), smalloc(), and smalloc0(). |