about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2018-07-20 09:09:51 +0000
committerEric Wong <e@80x24.org>2018-07-20 09:19:15 +0000
commit663605b6f23aeef467f8255729827cc1eaa0250c (patch)
treeb52ddc0ed2ca5da0b803ca8e5ce5e0ba45744440
parentfb622c3a50bc0de9fd38e8efab67c3d41702caf4 (diff)
downloadmwrap-663605b6f23aeef467f8255729827cc1eaa0250c.tar.gz
This release includes significant changes to track live
allocations and frees.  It can find memory leaks from malloc
with less overhead than valgrind's leakchecker and there is a
new Rack endpoint (MwrapRack) which can display live allocation
stats.

API additions:

* Mwrap#[] - https://80x24.org/mwrap/Mwrap.html#method-c-5B-5D
* Mwrap::SourceLocation - https://80x24.org/mwrap/Mwrap/SourceLocation.html
* MwrapRack - https://80x24.org/mwrap/MwrapRack.html

Incompatible changes:

* Mwrap.clear now an alias to Mwrap.reset; as it's unsafe
  to implement the new Mwrap#[] API otherwise:
  https://80x24.org/mwrap-public/20180716211933.5835-12-e@80x24.org/

26 changes since v1.0.0:

      README: improve usage example
      MANIFEST: add .document
      add benchmark
      use __attribute__((weak)) instead of dlsym
      Mwrap.dump: do not segfault on invalid IO arg
      bin/mwrap: support LISTEN_FDS env from systemd
      support per-allocation headers for per-alloc tracking
      mwrap: use malloc to do our own memalign
      hold RCU read lock to insert each allocation
      realloc: do not copy if allocation failed
      internal_memalign: do not assume real_malloc succeeds
      ensure ENOMEM is preserved in errno when appropriate
      memalign: check alignment on all public functions
      reduce stack usage from file names
      resolve real_malloc earlier for C++ programs
      allow analyzing live allocations via Mwrap[location]
      alias Mwrap.clear to Mwrap.reset
      implement accessors for SourceLocation
      mwrap_aref: quiet -Wshorten-64-to-32 warning
      fixes for FreeBSD 11.1...
      use memrchr to extract address under glibc
      do not track allocations for constructor and Init_
      disable memalign tracking by default
      support Mwrap.quiet to temporarily disable allocation tracking
      mwrap_rack: Rack app to track live allocations
      documentation updates for 2.0.0 release
-rw-r--r--MANIFEST1
-rw-r--r--mwrap.gemspec2
2 files changed, 2 insertions, 1 deletions
diff --git a/MANIFEST b/MANIFEST
index 264baa3..fc72b22 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -8,5 +8,6 @@ bin/mwrap
 ext/mwrap/extconf.rb
 ext/mwrap/jhash.h
 ext/mwrap/mwrap.c
+lib/mwrap_rack.rb
 mwrap.gemspec
 test/test_mwrap.rb
diff --git a/mwrap.gemspec b/mwrap.gemspec
index 8a230a1..56589a0 100644
--- a/mwrap.gemspec
+++ b/mwrap.gemspec
@@ -10,7 +10,7 @@ end
 
 Gem::Specification.new do |s|
   s.name = 'mwrap'
-  s.version = '1.0.0'
+  s.version = '2.0.0'
   s.homepage = 'https://80x24.org/mwrap/'
   s.authors = ["Ruby hackers"]
   s.summary = 'LD_PRELOAD malloc wrapper for Ruby'