#include "tools.h"
#include "htdebug.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
Go to the source code of this file.
Defines | |
#define | LN2 0.693147180559945309417232121458177 |
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)=&out_of_memory |
|
Definition at line 73 of file tools.cc. Referenced by calc_entropy(). |
|
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(), AddressFlat32::compareDelinear(), AddressFlat64::compareDelinear(), AddressX86Flat32::compareDelinear(), AddressX86_1632::compareDelinear(), and AddressX86_1616::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 MachoAnalyser::beginAnalysis(), NEAnalyser::beginAnalysis(), PEAnalyser::beginAnalysis(), XBEAnalyser::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 155 of file tools.cc. Referenced by done_app(), init_app(), smalloc(), and smalloc0(). |