Permalink
Browse files

add README.tlsf

  • Loading branch information...
1 parent a2bc284 commit fa329e248e66eb7bfdf243e75e51b5061f55f2df @kmarkus committed Sep 20, 2011
Showing with 35 additions and 0 deletions.
  1. +35 −0 README.tlsf
View
@@ -0,0 +1,35 @@
+TLSF Lua
+--------
+
+This is Lua extended with the TLSF O(1) memory allocator [1]. An
+additional '-m' command line switch is provided to set the amount of
+memory (in bytes) that is pre-allocated.
+
+API
+---
+
+Some additonal functions are provided in the built-in 'tlsf' module:
+
+tlsf.warn(bool)
+ - without argument: return status
+ - with argument, enable/disable warnings on memory allocations
+
+tlsf.trace(bool)
+ - without argument: return status
+ - with argument, enable/disable backtracing on memory allocations
+
+tlsf.stats()
+ - returns three values:
+ 1. current tlsf memory use
+ 2. highest previous memory use
+ 3. total memory available
+
+
+License
+-------
+
+Lua is licensed under the MIT license. TLSF is licensed under a dual
+LGPL / GPLv2(with linking exception) license scheme. TLSF Lua is
+also released under the MIT License.
+
+[1] http://rtportal.upv.es/rtmalloc/

0 comments on commit fa329e2

Please sign in to comment.