Skip to content

Commit

Permalink
update version to 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
WuBingzheng committed Jul 28, 2016
1 parent 6a9d6d3 commit f0f60fe
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 17 deletions.
48 changes: 35 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ I searched the internet but didn't find one. Then I wrote such a tool myself.
Hope this is useful for others.


## status

Stable and completed.

`memleax` is a tool with single and clear aim. There is
no bug to fix and no new feature to add by now.

However if you get any new feature or bug, please report
to [gitlab] (https://github.com/WuBingzheng/memleax),
or mail to <mailto:[email protected]>.


## how it works

`memleax` attachs a running process, hooks memory allocate/free APIs,
Expand Down Expand Up @@ -67,6 +79,11 @@ In summary, I think `Valgrind` is more powerful, while `memleax` is more
convenient and suitable for production environment.


## licence

GPLv2


## OS-machine

+ GNU/Linux-x86_64, tested on CentOS 7.2 and Ubuntu 16.04
Expand All @@ -88,9 +105,13 @@ However another `libelf` and `libdwarf` still can be installed by `pkg`.
install `libdwarf` by `pkg`, and must not install `libelf` by `pkg`.


## licence
## build

GPLv2
After all required libraries are installed, run

$ configure
$ make
$ sudo make install


## usage
Expand All @@ -114,10 +135,10 @@ to get report in time.
The memory blocks live longer than the threshold, are showed as:

CallStack[3]: memory expires with 101 bytes, backtrace:
0x00007fd322bd8220 malloc()+0
0x000000000040084e foo()+14 foo.c:12
0x0000000000400875 bar()+37 xxxxx.c:20
0x0000000000400acb main()+364 test.c:80
0x00007fd322bd8220 libc-2.17.so malloc()+0
0x000000000040084e test foo()+14 foo.c:12
0x0000000000400875 test bar()+37 bar.c:20
0x0000000000400acb test main()+364 test.c:80

`CallStack[3]` is the ID of CallStack where memory leak happens.

Expand All @@ -139,11 +160,12 @@ When you think you have found the answer, stop the debug.

### stop

`memleax` stops monitoring and quits on:
`memleax` quits on:

* you stop it, by Ctrl-C or kill,
* the target process quits, or
* too many leaks on one CallStack.
* the target process quits,
* too many leaks at one CallStack (option -m), or
* too many CallStacks with memory leak (option -c).

After quiting, it also gives statistics for the CallStacks with memory leak:

Expand All @@ -152,7 +174,7 @@ After quiting, it also gives statistics for the CallStacks with memory leak:
alloc=20 (2020 bytes), free=0 (0 bytes)
freed memory live time: min=0 max=0 average=0
un-freed memory live time: max=20
0x00007fd322bd8220 malloc()+0
0x000000000040084e foo()+14 foo.c:12
0x0000000000400875 bar()+37 xxxxx.c:20
0x0000000000400acb main()+364 test.c:80
0x00007fd322bd8220 libc-2.17.so malloc()+0
0x000000000040084e test foo()+14 foo.c:12
0x0000000000400875 test bar()+37 bar.c:20
0x0000000000400acb test main()+364 test.c:80
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ for opt in $@; do
prefix=$value
;;
'--version')
echo "version: 0.4.1"
echo "version: 1.0"
exit 0
;;
'--help')
Expand Down
4 changes: 2 additions & 2 deletions memleax-centos.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Summary: memleax detects memory leak of a running process
Group: Development/Debuggers
URL: https://github.com/WuBingzheng/memleax
Vendor: Wu Bingzheng
Version: 0.4.1
Version: 1.0

License: GPL
Release: 1.el7
Release: el7
Source: memleax-%{version}.tar.gz
Requires: libdwarf, elfutils-libelf, libunwind
BuildRequires: libdwarf-devel, elfutils-libelf-devel, libunwind-devel
Expand Down
2 changes: 1 addition & 1 deletion memleax.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ int main(int argc, char * const *argv)
printf("%s", help);
return 0;
case 'v':
printf("Version: 0.4.1\n");
printf("Version: 1.0\n");
printf("Author: Wu Bingzheng\n");
return 0;
default:
Expand Down

0 comments on commit f0f60fe

Please sign in to comment.