<commit_before>[![Build Status](https://travis-ci.org/vincetse/allocator.svg?branch=master)](https://travis-ci.org/vincetse/allocator) [![Coverage Status](https://coveralls.io/repos/github/vincetse/allocator/badge.svg?branch=master)](https://coveralls.io/github/vincetse/allocator?branch=master

memory-allocators
=================

A set of memory allocators for use with the C++ Standard Template Library.

buffer_allocator
----------------

This allocator was inspired by [<NAME>](http://www.codeguru.com/member.php/John+Wellbelove/)'s article, [Stack Allocators for STL Containers](http://www.codeguru.com/cpp/article.php/c18503/C-Programming-Stack-Allocators-for-STL-Containers.htm), and is an attempt to offer an alternative solution to John's implementation (which needs a few tweaks to run on Linux).

### Before You Start

Memory allocators are a slightly advanced concept in C++, so I would highly recommend you do not try to use this library if you are not familiar with them.  There are simply too many ways you can shoot yourself in the foot without understanding why.  I gave some background on how I got into this topic in [my blog post](http://thelazyenginerd.com/post/52004241212/stack-allocators-for-stl-containers) about John's article, which makes me think I have a slight clue what I am doing here.

If you are interested in improving the memory management of your application, I recommend you try a new malloc library first before messing with memory allocators.  The 2 that I have experience with are:

1. [jemalloc](http://www.canonware.com/jemalloc/)
2. [tcmalloc](https://code.google.com/p/gperftools/)

[Nedmalloc](http://www.nedprod.com/programs/portable/nedmalloc/) seems to be another possibility, though I do not have any experience with it.

### Design
<commit_msg>really fix readme (#4)<commit_after>[![Build Status](https://travis-ci.org/vincetse/allocator.svg?branch=master)](https://travis-ci.org/vincetse/allocator)
[![Coverage Status](https://coveralls.io/repos/github/vincetse/allocator/badge.svg?branch=master)](https://coveralls.io/github/vincetse/allocator?branch=master)

memory-allocators
=================

A set of memory allocators for use with the C++ Standard Template Library.

buffer_allocator
----------------

This allocator was inspired by [<NAME>](http://www.codeguru.com/member.php/John+Wellbelove/)'s article, [Stack Allocators for STL Containers](http://www.codeguru.com/cpp/article.php/c18503/C-Programming-Stack-Allocators-for-STL-Containers.htm), and is an attempt to offer an alternative solution to John's implementation (which needs a few tweaks to run on Linux).

### Before You Start

Memory allocators are a slightly advanced concept in C++, so I would highly recommend you do not try to use this library if you are not familiar with them.  There are simply too many ways you can shoot yourself in the foot without understanding why.  I gave some background on how I got into this topic in [my blog post](http://thelazyenginerd.com/post/52004241212/stack-allocators-for-stl-containers) about John's article, which makes me think I have a slight clue what I am doing here.

If you are interested in improving the memory management of your application, I recommend you try a new malloc library first before messing with memory allocators.  The 2 that I have experience with are:

1. [jemalloc](http://www.canonware.com/jemalloc/)
2. [tcmalloc](https://code.google.com/p/gperftools/)

[Nedmalloc](http://www.nedprod.com/programs/portable/nedmalloc/) seems to be another possibility, though I do not have any experience with it.

### Design

{'fraction_non_alphanumeric': 0.11820199778024418, 'fraction_numerical': 0.010821309655937847, 'mean_word_length': 4.740445859872612, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 10, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6008653', 'n_tokens_mistral': 1077, 'n_tokens_neox': 1033, 'n_words': 375}