about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-02-06 09:50:31 +0000
committerEric Wong <normalperson@yhbt.net>2011-02-06 09:50:31 +0000
commit3b9f51748e99394cbe4d6b9b10b29aaff1ac0522 (patch)
treea69bc249819f6e3b8cd3e5573df64a5f5d413397
parentd0fd5eaed1125d06ad56f326f524b9d9e8b47512 (diff)
downloadmall-3b9f51748e99394cbe4d6b9b10b29aaff1ac0522.tar.gz
doc: update README
-rw-r--r--README64
-rw-r--r--ext/mall/mall.c.erb3
2 files changed, 20 insertions, 47 deletions
diff --git a/README b/README
index e7418ca..fa76d6b 100644
--- a/README
+++ b/README
@@ -1,55 +1,22 @@
-= Mall - access the mallinfo(3) and mallopt(3) functions
+= Mall - access malloc tuning/reporting functions + glibc extras
 
-This library provides access to the mallinfo(3) and mallopt(3)
-functions.  mallinfo(3) is used for reporting malloc statistics and
-mallopt(3) can be used to tune malloc(3) implementations.  See the
-corresponding documentation for the C library functions before
-proceeding.
+This library provides access to the SysV mallinfo(3) and mallopt(3)
+functions as well as (optionally) several glibc-specific malloc_*()
+functions.  Mall.opt, Mall.trim and Mall.xml are the most interesting.
 
-These functions are implementation-specific, so tuning options that
-work for one implementation of malloc may not work at all for another
-implementation.
+Constants and functionality are defined at build time, so changing
+your malloc implementation may require rebuilding and reinstalling
+this library.
 
-Constants defined in the the malloc.h header with a "M_" prefix are
-defined without the prefix in the Mall namespace (e.g.
-M_TRIM_THRESHOLD => Mall::TRIM_THRESHOLD).
+== Requirements
 
-== FEATURES/PROBLEMS:
+* A malloc implementation supporting mallinfo(3) and/or mallopt(3),
+  the ptmalloc-family of allocators used by glibc is recommended
+  and the only tested implementation.
 
-* This has only been tested with glibc (ptmalloc2) malloc, although
-  it is likely to work with ptmalloc3.  Reports of success/failure
-  on other systems are greatly appreciated.
+== Install
 
-* Mall.info does not work reliably when your application using more
-  than 2G of memory (this is probably a bad idea anyways).
-
-* Neither Mall.info nor Mall.opt are supported by all malloc
-  implementations, nor are all constants always defined or useful
-  if they're defined.
-
-* Constants and functionality are defined at build time, so changing
-  your malloc implementation may require rebuilding and reinstalling
-  this library.
-
-== SYNOPSIS:
-
-  # Assuming a glibc/ptmalloc system:
-
-  require 'mall'
-
-  Mall.opt(Mall::TRIM_THRESHOLD, 1024*1024)
-  Mall.opt(Mall::TOP_PAD, 1024*1024)
-  Mall.opt(Mall::MXFAST, 80)
-
-  hash = Mall.info
-
-== REQUIREMENTS:
-
-* A malloc implementation supporting mallinfo(3) and/or mallopt(3).
-
-== INSTALL:
-
-* gem install mall
+  gem install mall
 
 == SOURCE:
 
@@ -61,3 +28,8 @@ The source code is available via git:
 cgit repository viewer:
 
 * http://bogomips.org/mall.git (cgit)
+
+== Contact
+
+All feedback (bug reports, user/development dicussion, patches, pull
+requests) go to the mailing list: {mall@librelist.org}[mail@librelist.org]
diff --git a/ext/mall/mall.c.erb b/ext/mall/mall.c.erb
index 59b95af..bbfeaf3 100644
--- a/ext/mall/mall.c.erb
+++ b/ext/mall/mall.c.erb
@@ -190,7 +190,8 @@ static VALUE xml(int argc, VALUE *argv, VALUE self)
 
 /*
  * Mall is a single module with several singleton methods, most of which
- * are glibc-specific.
+ * are glibc-specific.  All constants may be used as the first argument
+ * to Mall.opt.
  */
 void Init_mall(void)
 {