diff options
author | Evan Huus <eapache@gmail.com> | 2014-02-26 17:22:22 -0500 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-02-26 22:25:22 +0000 |
commit | df77e26485b9c46ee397ef2fc49f9f8ee3488431 (patch) | |
tree | 09c2f72615c5c48475dd114a487c8fa7e980649d /doc/README.wmem | |
parent | a8ef66f25065e65e6b61ad5d28113565a70c6722 (diff) |
Fix some wmem-related documentation.
Discovered while reviewing Ibd3efb92a203861f507ce71bc8d04d19d9d38a93
Change-Id: Ie4dfc1b9b7a99f14657148ed5a935bbb079c2b4e
Reviewed-on: https://code.wireshark.org/review/415
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'doc/README.wmem')
-rw-r--r-- | doc/README.wmem | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/README.wmem b/doc/README.wmem index 8012bea2e1..853d078997 100644 --- a/doc/README.wmem +++ b/doc/README.wmem @@ -68,6 +68,15 @@ next packet is dissected. This is, in fact, the scope of Wireshark's pinfo structure, so the pinfo struct has a 'pool' member which is a wmem pool scoped to the lifetime of the pinfo struct. +2.1.3 NULL Pool + +Any function that takes a pointer to a wmem_allocator_t can also be passed NULL +instead. In this case the memory is not allocated in a pool at all - it is +manually managed, and *must* eventually be passed to wmem_free() in order to +prevent memory leaks. Note that passing wmem_allocated memory directly to free() +or g_free() is not safe; the backing type of manually managed memory may be +changed without warning. + 2.2 API Full documentation for each function (parameters, return values, behaviours) @@ -77,7 +86,7 @@ This is just an overview of which header files you should be looking at. 2.2.1 Core API wmem_core.h - - Basic memory management functions like malloc, realloc and free. + - Basic memory management functions (wmem_alloc, wmem_realloc, wmem_free). 2.2.2 Strings |