diff options
author | Andrew Bartlett <abartlet@samba.org> | 2016-11-28 14:44:40 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2016-12-01 05:54:22 +0100 |
commit | 032e25fdc6f5f9c59ead471bc01ad62ae7383d81 (patch) | |
tree | f7a7d3fb7687e322e3e696c1d4baecaf87dce477 /lib/talloc | |
parent | 3c9d703d45a72cf10b4e9065e2071fff84dc67c8 (diff) | |
download | samba-032e25fdc6f5f9c59ead471bc01ad62ae7383d81.tar.gz |
talloc: add ASCII art to describe parent/child arrangement
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Diffstat (limited to 'lib/talloc')
-rw-r--r-- | lib/talloc/talloc.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c index 927b7f5e5f8..a097ce088df 100644 --- a/lib/talloc/talloc.c +++ b/lib/talloc/talloc.c @@ -263,7 +263,32 @@ typedef int (*talloc_destructor_t)(void *); struct talloc_pool_hdr; struct talloc_chunk { + /* + * flags includes the talloc magic, which is randomised to + * make overwrite attacks harder + */ unsigned flags; + + /* + * If you have a logical tree like: + * + * <parent> + * / | \ + * / | \ + * / | \ + * <child 1> <child 2> <child 3> + * + * The actual talloc tree is: + * + * <parent> + * | + * <child 1> - <child 2> - <child 3> + * + * The children are linked with next/prev pointers, and + * child 1 is linked to the parent with parent/child + * pointers. + */ + struct talloc_chunk *next, *prev; struct talloc_chunk *parent, *child; struct talloc_reference_handle *refs; |