From 681a3ad5a2d80a1b76e336256fb90f9caf2b89df Mon Sep 17 00:00:00 2001 From: Evan Huus Date: Wed, 23 Jan 2013 01:11:36 +0000 Subject: 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 --- doc/README.wmem | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') 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() -- cgit v1.2.3