diff options
author | Peter H. Froehlich <peter.hans.froehlich@gmail.com> | 2021-02-13 20:06:01 +0100 |
---|---|---|
committer | Peter H. Froehlich <peter.hans.froehlich@gmail.com> | 2021-02-13 20:06:01 +0100 |
commit | 8eee983028751ef16f0700eae777a48b10e722b6 (patch) | |
tree | 3422b4317fb12a576992f7ceb3c25c697e0f60bb /README.md | |
parent | f94fcf7052d45be9842bca09d813b45e3da8d0c3 (diff) | |
download | simple-allocators-8eee983028751ef16f0700eae777a48b10e722b6.tar.gz |
Big-ish rework and cleanup; a README even.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..07f3cef --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# Simple Allocators + +If you're curious about simple memory allocation schemes in C, maybe you'll be +able to learn a thing or two here. + +## Limitations + +I've tried to keep the code for these allocators as simple as possible, so if +you want to use any of them "in production" you'll have to add a few more bells +and whistles. +For starters, real programs will require more than just one object size, so you +will have to generalize the code for *cached* and *pool* allocators to support +"allocator objects" of some kind. +The *arena* allocator already supports "arbitrary" object sizes, but it has a +fixed maximum capacity that may not be appropriate for all programs; code to +"grow" the arena when necessary might be a good addition. +Nothing here is thread-safe either, so you may need to throw in a lock or three. |