diff options
author | H. Peter Anvin <hpa@zytor.com> | 2001-10-20 02:12:22 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2001-10-20 02:12:22 +0000 |
commit | 50cedb0ff19233273ef33cb5b5e8725025a35024 (patch) | |
tree | 25b21afff2ef45d706df0b05f18473516b8911f5 /README | |
parent | f3d637296f1f839d4a95a849a7dbfbb600f563f1 (diff) | |
download | lpsm-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-- | README | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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; |