Project

mall

0.0
Low commit activity in last 3 years
No release in over a year
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. 1.0.3 fixes minor issues to be compatible with gem install and rake.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme
= Mall - access malloc tuning/reporting functions + glibc extras

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.

Constants and functionality are defined at build time, so changing
your malloc implementation may require rebuilding and reinstalling
this library.

== Quick Start

  > require 'mall'

  > irb(main):007:0> Mall::info

  => {:arena=>12099584, :ordblks=>139, :smblks=>30, :hblks=>3, :hblkhd=>1650688, :usmblks=>0, :fsmblks=>1536, :uordblks=>12068400, :fordblks=>31184, :keepcost=>3616}

Where:

  struct mallinfo2 {
    size_t arena;     /* Non-mmapped space allocated (bytes) */
    size_t ordblks;   /* Number of free chunks */
    size_t smblks;    /* Number of free fastbin blocks */
    size_t hblks;     /* Number of mmapped regions */
    size_t hblkhd;    /* Space allocated in mmapped regions (bytes) */
    size_t usmblks;   /* See below */
    size_t fsmblks;   /* Space in freed fastbin blocks (bytes) */
    size_t uordblks;  /* Total allocated space (bytes) */
    size_t fordblks;  /* Total free space (bytes) */
    size_t keepcost;  /* Top-most, releasable space (bytes) */
  };

See `man 3 mallinfo2` (https://man7.org/linux/man-pages/man3/mallinfo.3.html).

  irb(main):008:0> Mall::dump_stats

  Arena 0:
  system bytes     =   12099584
  in use bytes     =   12065808
  Total (incl. mmap):
  system bytes     =   13750272
  in use bytes     =   13716496
  max mmap regions =          4
  max mmap bytes   =    1851392

  => nil

== Requirements

* 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.

== Build

  gem install rake-compiler
  rake build

== Install

  git clone https://github.com/sitano/mall.git && cd mall && git co ivan
  gem build mall.gemspec
  gem install mall-1.0.2.gem

or add

  gem 'mall', git: 'https://github.com/sitano/mall.git', branch: 'ivan'

and then:

  $ bundle install

== SOURCE:

The original source code is available via git:

  git://yhbt.net/mall.git
  http://yhbt.net/mall.git

cgit repository viewer:

* http://yhbt.net/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]