Skip to content

Commit

Permalink
little fixes - v0.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
samsk committed Sep 25, 2013
1 parent 7db7daf commit dc77626
Show file tree
Hide file tree
Showing 8 changed files with 131 additions and 29 deletions.
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

log-malloc2
log-malloc2

MAINTAINER:

Expand Down
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

0.2.4 Wed Sep 24 22:15:31 CEST 2013
- removed dummy prefix 0x from %p printouts (I'm pretty blind - I've fixed
it 'lightyears' ago in some private copy and not pushed it to repo ;-)
- added possibility to disable call counts, not everyone needs them and they
might harm performance, because of using CAS operation

0.2.3 Thu Mar 29 18:58:35 CEST 2012
- improved initialization to be compatible with libraries
using malloc functions in lib constructor functions (like libproc)
Expand Down
7 changes: 7 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
0.2.3 2013-09-24

BUGFIX

* fixed pointer formating
* automake tools update

0.2.3 2012-03-29

IMPROVEMENTS
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
################################################################################

Program : log-malloc2 (library)
Version : 0.2.3
Version : 0.2.4
Purpose : Malloc logging library with backtrace and byte-exact memory
tracking.
License : GNU GPL v3 (see file COPYING)
Expand Down
3 changes: 3 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/* config.h.in. Generated from configure.ac by autoheader. */

/* Disable functions call counting */
#undef DISABLE_CALL_COUNTS

/* Define to 1 if you have the `backtrace' function. */
#undef HAVE_BACKTRACE

Expand Down
66 changes: 55 additions & 11 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for log-malloc2 0.2.3.
# Generated by GNU Autoconf 2.69 for log-malloc2 0.2.4.
#
# Report bugs to <_samuel_._behan_(at)_dob_._sk>.
#
Expand Down Expand Up @@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='log-malloc2'
PACKAGE_TARNAME='log-malloc2'
PACKAGE_VERSION='0.2.3'
PACKAGE_STRING='log-malloc2 0.2.3'
PACKAGE_VERSION='0.2.4'
PACKAGE_STRING='log-malloc2 0.2.4'
PACKAGE_BUGREPORT='_samuel_._behan_(at)_dob_._sk'
PACKAGE_URL='http://devel.dob.sk/log-malloc2'

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

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

Expand Down Expand Up @@ -1388,7 +1390,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of log-malloc2 0.2.3:";;
short | recursive ) echo "Configuration of log-malloc2 0.2.4:";;
esac
cat <<\_ACEOF

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

Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
Expand Down Expand Up @@ -1494,7 +1498,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
log-malloc2 configure 0.2.3
log-malloc2 configure 0.2.4
generated by GNU Autoconf 2.69

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

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

$ $0 $@
Expand Down Expand Up @@ -2709,7 +2713,7 @@ fi

# Define the identity of the package.
PACKAGE='log-malloc2'
VERSION='0.2.3'
VERSION='0.2.4'


# Some tools Automake needs.
Expand Down Expand Up @@ -14862,7 +14866,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu



for ac_func in pread backtrace backtrace_symbols_fd malloc_usable_size
for ac_func in pread backtrace backtrace_symbols_fd
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Expand Down Expand Up @@ -14984,6 +14988,46 @@ else
fi


# Check whether --enable-call-count was given.
if test "${enable_call_count+set}" = set; then :
enableval=$enable_call_count; no_call_count=no
else
no_call_count=yes

fi


if test "x$no_call_count" = "xyes"; then

$as_echo "#define DISABLE_CALL_COUNTS 1" >>confdefs.h

fi

no_usable_size=no
# Check whether --enable-usable-size was given.
if test "${enable_usable_size+set}" = set; then :
enableval=$enable_usable_size; no_usable_size=no
else
no_usable_size=yes

fi


if test "x$no_usable_size" = "xyes"; then
for ac_func in malloc_usable_size
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

fi

# FLAGS
CFLAGS="-DWITH_PTHREADS -D_GNU_SOURCE -Xcompiler -nostartfiles"
LDFLAGS="-ldl -lpthread"
Expand Down Expand Up @@ -15531,7 +15575,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by log-malloc2 $as_me 0.2.3, which was
This file was extended by log-malloc2 $as_me 0.2.4, which was
generated by GNU Autoconf 2.69. Invocation command line was

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

Expand Down
25 changes: 22 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## liblog-malloc2
####

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

AC_CHECK_FUNCS([ pread backtrace backtrace_symbols_fd malloc_usable_size ])
AC_CHECK_FUNCS([ pread backtrace backtrace_symbols_fd ])

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

AC_ARG_ENABLE([optimize],
AS_HELP_STRING([--disable-optimize], [do not optimize library]),
[no_optimize=yes], no_optimize=no
[no_optimize=yes], [no_optimize=no]
)

AC_ARG_ENABLE([call-count],
AS_HELP_STRING([--disable-call-count], [do not count function calls]),
[no_call_count=no], [no_call_count=yes]
)

if test "x$no_call_count" = "xyes"; then
AC_DEFINE(DISABLE_CALL_COUNTS, 1, [Disable functions call counting])
fi

no_usable_size=no
AC_ARG_ENABLE([usable-size],
AS_HELP_STRING([--disable-usable-size], [do not check usable size]),
[no_usable_size=no], [no_usable_size=yes]
)

if test "x$no_usable_size" = "xyes"; then
AC_CHECK_FUNCS([ malloc_usable_size ])
fi

# FLAGS
CFLAGS="-DWITH_PTHREADS -D_GNU_SOURCE -Xcompiler -nostartfiles"
LDFLAGS="-ldl -lpthread"
Expand Down
Loading

0 comments on commit dc77626

Please sign in to comment.