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
=== modified file 'configure.ac'
--- configure.ac 2009-06-30 18:09:07 +0000
+++ configure.ac 2009-07-08 10:33:58 +0000
@@ -348,7 +348,16 @@
348 [ac_enable_mtmalloc="$enableval"],348 [ac_enable_mtmalloc="$enableval"],
349 [ac_enable_mtmalloc="yes"])349 [ac_enable_mtmalloc="yes"])
350350
351 if test "x$ac_enable_mtmalloc" != "xno"351 AC_ARG_ENABLE([umem],
352 [AS_HELP_STRING([--enable-umem],
353 [Enable linking with libumem @<:@default=off@:>@])],
354 [ac_enable_umem="$enableval"],
355 [ac_enable_umem="no"])
356
357 if test "x$ac_enable_umem" = "xyes"
358 then
359 AC_CHECK_LIB(umem,malloc,[],[])
360 elif test "x$ac_enable_mtmalloc" != "xno"
352 then361 then
353 AC_CHECK_LIB(mtmalloc,malloc,[],[])362 AC_CHECK_LIB(mtmalloc,malloc,[],[])
354 fi363 fi