aboutsummaryrefslogtreecommitdiffstats
path: root/README
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2001-10-20 02:12:22 +0000
committerH. Peter Anvin <hpa@zytor.com>2001-10-20 02:12:22 +0000
commit50cedb0ff19233273ef33cb5b5e8725025a35024 (patch)
tree25b21afff2ef45d706df0b05f18473516b8911f5 /README
parentf3d637296f1f839d4a95a849a7dbfbb600f563f1 (diff)
downloadlpsm-50cedb0ff19233273ef33cb5b5e8725025a35024.tar.gz
lpsm-50cedb0ff19233273ef33cb5b5e8725025a35024.tar.xz
lpsm-50cedb0ff19233273ef33cb5b5e8725025a35024.zip
Split apart into modules. Create lpsm_zalloc()/lpsm_calloc().
Diffstat (limited to 'README')
-rw-r--r--README11
1 files changed, 11 insertions, 0 deletions
diff --git a/README b/README
index e9839e3..20e3204 100644
--- a/README
+++ b/README
@@ -159,6 +159,17 @@ void *lpsm_realloc(void *ptr, size_t new_size)
lpsm_free(ptr);
return NULL;
+void *lpsm_zalloc(size_t size)
+void *lpsm_calloc(size_t nmemb, size_t size)
+
+ Same as lpsm_malloc(), but returns memory that is initialized
+ to zero. The implementation attempts to be smart, and for
+ large blocks can be significantly more efficient than
+ lpsm_malloc() followed by memset().
+
+ lpsm_calloc() is implemented as an inline or macro which
+ returns lpsm_zalloc(nmemb*size).
+
struct lpsm_alloc_stats {
size_t size;