Merge lp:~trond-norbye/drizzle/libumem into lp:~drizzle-trunk/drizzle/development

Proposed by Trond Norbye
Status: Merged
Approved by: Monty Taylor
Approved revision: 1090
Merged at revision: not available
Proposed branch: lp:~trond-norbye/drizzle/libumem
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: None lines
To merge this branch: bzr merge lp:~trond-norbye/drizzle/libumem
Reviewer Review Type Date Requested Status
Monty Taylor Approve
Drizzle Developers Pending
Review via email: mp+8380@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Trond Norbye (trond-norbye) wrote :

Allow the user to add --enable-umem to link with libumem instead of libmtmalloc. Libumem is often referred to as "a userspace implementation of the slab allocator in the Solaris kernel", and provides a fast and scalable object caching. In addition to just being a memory allocator, it also provides great debugging functionality, such as: detecting memory leaks, buffer overruns, multiple free, use of uninitialized data etc.

Revision history for this message
Monty Taylor (mordred) wrote :

Looks great. At some point, we should also add an error if the user requests both of those options.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2009-06-30 18:09:07 +0000
3+++ configure.ac 2009-07-08 10:33:58 +0000
4@@ -348,7 +348,16 @@
5 [ac_enable_mtmalloc="$enableval"],
6 [ac_enable_mtmalloc="yes"])
7
8- if test "x$ac_enable_mtmalloc" != "xno"
9+ AC_ARG_ENABLE([umem],
10+ [AS_HELP_STRING([--enable-umem],
11+ [Enable linking with libumem @<:@default=off@:>@])],
12+ [ac_enable_umem="$enableval"],
13+ [ac_enable_umem="no"])
14+
15+ if test "x$ac_enable_umem" = "xyes"
16+ then
17+ AC_CHECK_LIB(umem,malloc,[],[])
18+ elif test "x$ac_enable_mtmalloc" != "xno"
19 then
20 AC_CHECK_LIB(mtmalloc,malloc,[],[])
21 fi