diff options
author | Evan Huus <eapache@gmail.com> | 2013-01-23 01:11:36 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-01-23 01:11:36 +0000 |
commit | 681a3ad5a2d80a1b76e336256fb90f9caf2b89df (patch) | |
tree | e0c520578e02285bfd71100c4df8f4dbc0625ad9 /doc | |
parent | c25c5915c5c94b5c70e51e4ca43f1aa5286c6349 (diff) |
Handle NULL-pointers and 0-lengths in a much simpler allocator-agnostic way,
and document the fact that allocator authors don't have to care.
svn path=/trunk/; revision=47220
Diffstat (limited to 'doc')
-rw-r--r-- | doc/README.wmem | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/README.wmem b/doc/README.wmem index 7740d7f37a..3b09935a0a 100644 --- a/doc/README.wmem +++ b/doc/README.wmem @@ -259,6 +259,12 @@ code in most cases - they are primarily optimisations for use by data structures that wmem might want to implement (it's hard, for example, to implement a dynamically sized array without some form of realloc). +Also note that allocators do not have to handle NULL pointers or 0-length +requests in any way - those checks are done in an allocator-agnostic way +higher up in wmem. Allocator authors can assume that all incoming pointers +(to realloc and free) are non-NULL, and that all incoming lengths (to malloc +and realloc) are non-0. + 4.1.3 Producer/Manager Functions - free_all() |