Skip to content

Commit dc77626

Browse files
committed
little fixes - v0.2.4
1 parent 7db7daf commit dc77626

File tree

8 files changed

+131
-29
lines changed

8 files changed

+131
-29
lines changed

AUTHORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
log-malloc2
2+
log-malloc2
33

44
MAINTAINER:
55

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11

2+
0.2.4 Wed Sep 24 22:15:31 CEST 2013
3+
- removed dummy prefix 0x from %p printouts (I'm pretty blind - I've fixed
4+
it 'lightyears' ago in some private copy and not pushed it to repo ;-)
5+
- added possibility to disable call counts, not everyone needs them and they
6+
might harm performance, because of using CAS operation
7+
28
0.2.3 Thu Mar 29 18:58:35 CEST 2012
39
- improved initialization to be compatible with libraries
410
using malloc functions in lib constructor functions (like libproc)

NEWS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
0.2.3 2013-09-24
2+
3+
BUGFIX
4+
5+
* fixed pointer formating
6+
* automake tools update
7+
18
0.2.3 2012-03-29
29

310
IMPROVEMENTS

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
################################################################################
33

44
Program : log-malloc2 (library)
5-
Version : 0.2.3
5+
Version : 0.2.4
66
Purpose : Malloc logging library with backtrace and byte-exact memory
77
tracking.
88
License : GNU GPL v3 (see file COPYING)

config.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
/* config.h.in. Generated from configure.ac by autoheader. */
22

3+
/* Disable functions call counting */
4+
#undef DISABLE_CALL_COUNTS
5+
36
/* Define to 1 if you have the `backtrace' function. */
47
#undef HAVE_BACKTRACE
58

configure

Lines changed: 55 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.69 for log-malloc2 0.2.3.
3+
# Generated by GNU Autoconf 2.69 for log-malloc2 0.2.4.
44
#
55
# Report bugs to <_samuel_._behan_(at)_dob_._sk>.
66
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
590590
# Identity of this package.
591591
PACKAGE_NAME='log-malloc2'
592592
PACKAGE_TARNAME='log-malloc2'
593-
PACKAGE_VERSION='0.2.3'
594-
PACKAGE_STRING='log-malloc2 0.2.3'
593+
PACKAGE_VERSION='0.2.4'
594+
PACKAGE_STRING='log-malloc2 0.2.4'
595595
PACKAGE_BUGREPORT='_samuel_._behan_(at)_dob_._sk'
596596
PACKAGE_URL='http://devel.dob.sk/log-malloc2'
597597

@@ -764,6 +764,8 @@ with_gnu_ld
764764
with_sysroot
765765
enable_libtool_lock
766766
enable_optimize
767+
enable_call_count
768+
enable_usable_size
767769
'
768770
ac_precious_vars='build_alias
769771
host_alias
@@ -1318,7 +1320,7 @@ if test "$ac_init_help" = "long"; then
13181320
# Omit some internal or obsolete options to make the list less imposing.
13191321
# This message is too long to be a string in the A/UX 3.1 sh.
13201322
cat <<_ACEOF
1321-
\`configure' configures log-malloc2 0.2.3 to adapt to many kinds of systems.
1323+
\`configure' configures log-malloc2 0.2.4 to adapt to many kinds of systems.
13221324

13231325
Usage: $0 [OPTION]... [VAR=VALUE]...
13241326

@@ -1388,7 +1390,7 @@ fi
13881390

13891391
if test -n "$ac_init_help"; then
13901392
case $ac_init_help in
1391-
short | recursive ) echo "Configuration of log-malloc2 0.2.3:";;
1393+
short | recursive ) echo "Configuration of log-malloc2 0.2.4:";;
13921394
esac
13931395
cat <<\_ACEOF
13941396

@@ -1404,6 +1406,8 @@ Optional Features:
14041406
optimize for fast installation [default=yes]
14051407
--disable-libtool-lock avoid locking (might break parallel builds)
14061408
--disable-optimize do not optimize library
1409+
--disable-call-count do not count function calls
1410+
--disable-usable-size do not check usable size
14071411

14081412
Optional Packages:
14091413
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1494,7 +1498,7 @@ fi
14941498
test -n "$ac_init_help" && exit $ac_status
14951499
if $ac_init_version; then
14961500
cat <<\_ACEOF
1497-
log-malloc2 configure 0.2.3
1501+
log-malloc2 configure 0.2.4
14981502
generated by GNU Autoconf 2.69
14991503

15001504
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1893,7 +1897,7 @@ cat >config.log <<_ACEOF
18931897
This file contains any messages produced by compilers while
18941898
running configure, to aid debugging if configure makes a mistake.
18951899

1896-
It was created by log-malloc2 $as_me 0.2.3, which was
1900+
It was created by log-malloc2 $as_me 0.2.4, which was
18971901
generated by GNU Autoconf 2.69. Invocation command line was
18981902

18991903
$ $0 $@
@@ -2709,7 +2713,7 @@ fi
27092713

27102714
# Define the identity of the package.
27112715
PACKAGE='log-malloc2'
2712-
VERSION='0.2.3'
2716+
VERSION='0.2.4'
27132717

27142718

27152719
# Some tools Automake needs.
@@ -14862,7 +14866,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
1486214866

1486314867

1486414868

14865-
for ac_func in pread backtrace backtrace_symbols_fd malloc_usable_size
14869+
for ac_func in pread backtrace backtrace_symbols_fd
1486614870
do :
1486714871
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
1486814872
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -14984,6 +14988,46 @@ else
1498414988
fi
1498514989

1498614990

14991+
# Check whether --enable-call-count was given.
14992+
if test "${enable_call_count+set}" = set; then :
14993+
enableval=$enable_call_count; no_call_count=no
14994+
else
14995+
no_call_count=yes
14996+
14997+
fi
14998+
14999+
15000+
if test "x$no_call_count" = "xyes"; then
15001+
15002+
$as_echo "#define DISABLE_CALL_COUNTS 1" >>confdefs.h
15003+
15004+
fi
15005+
15006+
no_usable_size=no
15007+
# Check whether --enable-usable-size was given.
15008+
if test "${enable_usable_size+set}" = set; then :
15009+
enableval=$enable_usable_size; no_usable_size=no
15010+
else
15011+
no_usable_size=yes
15012+
15013+
fi
15014+
15015+
15016+
if test "x$no_usable_size" = "xyes"; then
15017+
for ac_func in malloc_usable_size
15018+
do :
15019+
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15020+
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15021+
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15022+
cat >>confdefs.h <<_ACEOF
15023+
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15024+
_ACEOF
15025+
15026+
fi
15027+
done
15028+
15029+
fi
15030+
1498715031
# FLAGS
1498815032
CFLAGS="-DWITH_PTHREADS -D_GNU_SOURCE -Xcompiler -nostartfiles"
1498915033
LDFLAGS="-ldl -lpthread"
@@ -15531,7 +15575,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1553115575
# report actual input values of CONFIG_FILES etc. instead of their
1553215576
# values after options handling.
1553315577
ac_log="
15534-
This file was extended by log-malloc2 $as_me 0.2.3, which was
15578+
This file was extended by log-malloc2 $as_me 0.2.4, which was
1553515579
generated by GNU Autoconf 2.69. Invocation command line was
1553615580

1553715581
CONFIG_FILES = $CONFIG_FILES
@@ -15598,7 +15642,7 @@ _ACEOF
1559815642
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1559915643
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1560015644
ac_cs_version="\\
15601-
log-malloc2 config.status 0.2.3
15645+
log-malloc2 config.status 0.2.4
1560215646
configured by $0, generated by GNU Autoconf 2.69,
1560315647
with options \\"\$ac_cs_config\\"
1560415648

configure.ac

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## liblog-malloc2
22
####
33

4-
AC_INIT([log-malloc2], [0.2.3], [_samuel_._behan_(at)_dob_._sk], [log-malloc2],
4+
AC_INIT([log-malloc2], [0.2.4], [_samuel_._behan_(at)_dob_._sk], [log-malloc2],
55
[http://devel.dob.sk/log-malloc2])
66
AC_PREREQ([2.59])
77
AM_INIT_AUTOMAKE([1.10 -Wall no-define])
@@ -13,7 +13,7 @@ AC_CONFIG_HEADERS([config.h])
1313
AC_PROG_CXX
1414
LT_INIT([disable-static])
1515

16-
AC_CHECK_FUNCS([ pread backtrace backtrace_symbols_fd malloc_usable_size ])
16+
AC_CHECK_FUNCS([ pread backtrace backtrace_symbols_fd ])
1717

1818
AC_CHECK_LIB(dl, dlsym, , [
1919
AC_MSG_ERROR([
@@ -25,9 +25,28 @@ Can't find the pthread library (libpthread.so) !])])
2525

2626
AC_ARG_ENABLE([optimize],
2727
AS_HELP_STRING([--disable-optimize], [do not optimize library]),
28-
[no_optimize=yes], no_optimize=no
28+
[no_optimize=yes], [no_optimize=no]
2929
)
3030

31+
AC_ARG_ENABLE([call-count],
32+
AS_HELP_STRING([--disable-call-count], [do not count function calls]),
33+
[no_call_count=no], [no_call_count=yes]
34+
)
35+
36+
if test "x$no_call_count" = "xyes"; then
37+
AC_DEFINE(DISABLE_CALL_COUNTS, 1, [Disable functions call counting])
38+
fi
39+
40+
no_usable_size=no
41+
AC_ARG_ENABLE([usable-size],
42+
AS_HELP_STRING([--disable-usable-size], [do not check usable size]),
43+
[no_usable_size=no], [no_usable_size=yes]
44+
)
45+
46+
if test "x$no_usable_size" = "xyes"; then
47+
AC_CHECK_FUNCS([ malloc_usable_size ])
48+
fi
49+
3150
# FLAGS
3251
CFLAGS="-DWITH_PTHREADS -D_GNU_SOURCE -Xcompiler -nostartfiles"
3352
LDFLAGS="-ldl -lpthread"

0 commit comments

Comments
 (0)