⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 .ccmalloc

📁 这是一个用来加解密的算法库
💻 CCMALLOC
📖 第 1 页 / 共 2 页
字号:
set check-overwrites 1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 'check-underwrites' detect underwrites [0]% ----------------------------------------------------------------------% same with writes below allocated data. You do not have to set this% option if you only want detect 'off (below) by one' errors because% ccmalloc keeps a magic value just before the user data.set check-underwrites 1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 'check-free-space' can be used to find dangling pointers. [0]% ----------------------------------------------------------------------% A very serious type of bug is to write on data that has already been% freed. If this happens the free space management of malloc is in% trouble and you will perhaps encounter non deterministic behaviour of% your program. To test this first enable 'keep-deallocated-data' and% restart your program. If the problem goes away and ccmalloc does not% report anything then you should *also* enable 'check-free-space'. Now% ccmalloc checks already deallocated data for corruption.%% Note that to perform this check 'keep-deallocated-data' also must% be enabled and 'only-count' disabled.set check-free-space 1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 'check-interval' can be used to speed up checks [0]% ----------------------------------------------------------------------% If check-overwrite, check-underwrites or check-free-space is set then% the default is to do 'write checks' when data is deallocated and% to do 'free space checks' when reporting together with% 'write checks' for garbage. When you want these checks to be% performed more often then you should set 'check-interval' to a% positive number. This number is the interval between the number of% calls to free or malloc without performing the checks.%set check-interval 0%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 'check-start' can be used to speed up checks [0]% ----------------------------------------------------------------------% The flag 'check-start' delays the start of checks until the given% number of calls to free and malloc have occured. Together with% 'check-interval' you can use a binary search to find an aproximation% when a corruption occured! If you simply set check-interval to 1 and% check-start to 0 then this will slow done your program too much.%set check-start 0%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 'silent' disables banner [0]% ----------------------------------------------------------------------% If you don't want to see the banner of ccmalloc then set% 'silent' to 1 (f.e. when logging to stderr)%set silent%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 'file-info' en/disables file and line number information [1]% ----------------------------------------------------------------------% If your program was compiled with debugging information (-g) then% ccmalloc can generate line number and file info for call chains opening% a pipe to gdb. For very big programs this method is slow. In this case% you can set 'file-info' to zero and you will only get the function% names. For SunOS 4.3.1 'nm' does not 'demangle' C++ identifiers% very well. So gdb is called instead but only if 'file-info' is% not set to 0.%set file-info 1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 'continue' if ccmalloc aborts when something weired happened [0]% ----------------------------------------------------------------------% If the free function of ccmalloc is called with an argument that does% not make sense to ccmalloc or that has already been freed then you% probably want the program to stop at this point. This is also% the default behaviour. But you can force ccmalloc also to ignore% this if you set 'continue' to 1. This flag also controls the behaviour% of ccmalloc when free space is found to be corrupted or a write% boundary has been overwritten.%set continue 0%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 'chain-length' is the length of the maximal call chain [0 = infinite]% ----------------------------------------------------------------------% You can restrict the length of call chains by setting 'chain-length'% to a number greater than zero. If 'chain-length' is zero (the default)% then chains are as long as possible (on a non x86 system only call% chains with a finite maximal length can be generated). For big% programs especially if keep-deallocated-data is enabled this can% reduce the size of the log file from over 100MB to several MB!%set chain-length 0%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 'print-addresses' of data [0]% ----------------------------------------------------------------------% If you want to see the addresses of the allocated data (and% deallocated data if keep-deallocated-data is set to 1) set% 'print-addresses' to 1.%set print-addresses 0%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 'print-on-one-line' shortens log file [0]% ----------------------------------------------------------------------% The default is to print function names and file/line number info% on separate lines. With 'print-on-one-line' set 1 all are printed% on one line.%set print-on-one-line 0%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 'additional-line' enlarges readability [1]% ----------------------------------------------------------------------% When printing call chains an empty line is printed between to% call points. Set 'additional-line' to 0 to disable this feature.%set additional-line 1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 'statistics' enables more accurate profiling [0] % ----------------------------------------------------------------------% Calculate number of allocations and deallocations and bytes also on% a per call chain basis. This uses 4 additional pointers for each% call chain.set statistics 1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% set order for sorting of call chains [1] [1]% ----------------------------------------------------------------------% When printing the report to the log file the call chains are sorted by% default with respect to the largest accumulated garbage produced by% that call chain. This can be changed with setting 'sort-by-wasted'% to 0. In this case they are sorted by the number of allocated bytes.% If you want the number of allocations (only possible if 'statistics'% is enabled) as sorting criteria instead then set 'sort-by-size' to 0.%set sort-by-wasted 1%set sort-by-size 1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% report library chains [0]% ----------------------------------------------------------------------% Some external libraries (like libg++) have memory leaks. On some% systems even a call to printf produces a leak. ccmalloc tries to% detect this (only heuristically!) and with this flag you can control% if leaks produced by such library calls are reported.%% Since version 0.2.1 some similar effect can be achieved by using% 'dont-log-chain' with no argument.%set library-chains 0%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% print debugging information [X] (compile time dependend)% ----------------------------------------------------------------------%set debug X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% align memory on 8 byte boundary [0] (no effect on SunOS or Solaris)% ----------------------------------------------------------------------%set align-8-byte 0%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% only report allocations which ended up being wasted (i.e don't report% allocations which were completely freed properly. ) [1]% ----------------------------------------------------------------------%set only-wasting-alloc 1

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -