summaryrefslogtreecommitdiffstats
path: root/lib/talloc/talloc.h
Commit message (Collapse)AuthorAgeFilesLines
* talloc: check for TALLOC_GET_TYPE_ABORT_NOOPStefan Metzmacher2014-05-161-0/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* talloc: avoid a function call in TALLOC_FREE() if possible.Stefan Metzmacher2014-05-161-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* talloc: Add a warning to talloc_reference() documentation.Andreas Schneider2013-10-141-0/+8
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Kai Blin <kai@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Oct 14 23:05:54 CEST 2013 on sn-devel-104
* talloc: Add talloc_pooled_objectVolker Lendecke2013-09-081-0/+37
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* talloc: Allow nested pools.Volker Lendecke2013-09-081-2/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
* Add memory limiting capability to tallocSimo Sorce2012-10-051-0/+19
| | | | | | | | | | | By calling talloc_set_memlimit() we can now set a max memory limit for a whole talloc hierarchy. ANy attempt to allocate memory beyond the max allowed for the whole hierarchy wil cause an allocation failure. Stealing memory correctly accounts for used memory in the old and the new hierarchy but exceeding the memory limit in the new parent will not cause a failure.
* talloc: don't allow a talloc_pool inside a talloc_pool.Rusty Russell2012-07-181-1/+2
| | | | | | | | | We explicitly call free() on a pool which falls to zero, assuming it's not inside another pool (we crash). Check on creation and explicitly document this case. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* Talloc doc: talloc_strdup_append does not return duplicated stringPavel Březina2012-04-241-4/+4
|
* Talloc doc: when s == NULL in _append functionsPavel Březina2012-04-241-0/+12
|
* Talloc doc: Fix a cut&paste errorVolker Lendecke2012-04-181-4/+1
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Wed Apr 18 11:59:49 CEST 2012 on sn-devel-104
* Talloc doc: talloc_pool() when not enough memory in the poolPavel Březina2012-04-181-0/+4
|
* Talloc doc: TALLOC_FREE_FILLPavel Březina2012-04-181-0/+5
|
* Talloc doc: talloc_set_log_stderr()Pavel Březina2012-04-181-0/+7
| | | | Documents this function.
* Talloc doc: talloc_set_log_fn()Pavel Březina2012-04-181-0/+9
| | | | Documents this function.
* Talloc doc: talloc_set_abort_fn()Pavel Březina2012-04-181-2/+33
| | | | Documents this function.
* Talloc doc: talloc_asprintf_append_buffer()Pavel Březina2012-04-181-0/+22
| | | | Explains the difference between _append and _append_buffer.
* Talloc doc: talloc_strndup_append_buffer()Pavel Březina2012-04-181-2/+22
| | | | Explains the difference between _append and _append_buffer.
* Talloc doc: talloc_strndup_append()Pavel Březina2012-04-181-2/+12
| | | | The destination string is reallocated instead of duplicating the result.
* Talloc doc: talloc_strdup_append_buffer()Pavel Březina2012-04-181-1/+22
| | | | Explains the difference between _append and _append_buffer.
* Talloc doc: talloc_strdup_append()Pavel Březina2012-04-181-4/+18
| | | | The destination string is reallocated instead of duplicating the result.
* talloc - some documentation changesMatthias Dieter Wallnöfer2011-04-041-25/+24
| | | | | | | | | | | - Fix some typos - Document better the differences in the behaviour between talloc 1.X and 2.X. Previously this seemed a bit spongy to me. Reviewed-by: Jelmer + Tridge Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Mon Apr 4 11:05:42 CEST 2011 on sn-devel-104
* talloc - improve doxygen comment of "talloc_move"Matthias Dieter Wallnöfer2011-03-301-3/+3
| | | | | | Express better that this should be a pointer of a pointer. Reviewed-by: Tridge
* talloc: Typo fix for api docsBrad Hards2011-01-041-1/+1
|
* talloc: make header C++ safeSimo Sorce2010-10-201-0/+8
| | | | | Autobuild-User: Simo Sorce <idra@samba.org> Autobuild-Date: Wed Oct 20 18:15:09 UTC 2010 on sn-devel-104
* talloc: Add a warning about talloc_autofree_context() and dlclose()Volker Lendecke2010-09-241-0/+9
|
* talloc:documentation - explain that "talloc_free" works also with "NULL" ↵Matthias Dieter Wallnöfer2010-08-141-10/+21
| | | | | | | | | | | | | | | | | | | pointers (talloc.c) ... > static inline int _talloc_free_internal(void *ptr, const char *location) > { > struct talloc_chunk *tc; > > if (unlikely(ptr == NULL)) { > return -1; > } > > tc = talloc_chunk_from_ptr(ptr); ... Obviously this never had been documented before.
* talloc: Documented the missing string functions.Andreas Schneider2010-05-061-0/+86
|
* talloc: Documentation fix for tallocHolger Hans Peter Freyther2010-05-011-1/+1
|
* talloc: add a define for TALLOC_MAX_DEPTHAndrew Tridgell2010-04-021-0/+4
| | | | Thanks to the suggestion from simo
* doxygen: talloc_get_type name fixed in Doxygen documentationKamen Mazdrashki2010-03-101-1/+1
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* talloc: Fix abi checks and ifdefsSimo Sorce2010-02-081-2/+2
| | | | | teach the abi check scripts to skip the DOXYGEN sections fix the header to use #ifdef DOXYGEN and not #if DOXYGEN
* talloc: fixed doc typoAndrew Tridgell2010-02-081-1/+1
|
* Move the talloc details to the mainpage.Andreas Schneider2010-02-081-64/+0
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* talloc: Documented talloc with doxygen.Andreas Schneider2010-02-081-67/+1523
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* talloc: fixed talloc_disable_null_tracking()Andrew Tridgell2009-09-201-0/+1
| | | | | | | | | | | | When we disable null tracking, we need to move any existing objects that are under the null_context to be parented by the true NULL context. We also need a new talloc_enable_null_tracking_no_autofree() function, as the talloc testsuite cannot cope with the moving of the autofree context under the null_context as it wants to check exact counts of objects under the null_context, and smbtorture has a large number of objects in the autofree_context from .init functions
* talloc: add defines and functions for TALLOC_MAJOR/MINOR_VERSIONStefan Metzmacher2009-08-241-0/+6
| | | | | | | | | | We also use the major and minor versions in the TALLOC_MAGIC, so that we can detect if two conflicting versions of talloc are loaded in one process. In this case we use talloc_log() to output a very useful debug message before we call talloc_abort(). metze
* talloc: remove ABI compat functionsStefan Metzmacher2009-08-241-3/+0
| | | | metze
* talloc: add talloc_set_log_fn() and talloc_set_log_stderr()Stefan Metzmacher2009-08-241-0/+2
| | | | | | | So that the application can setup a log function to get ERROR and WARNING messages. metze
* Restore ABI compatibility for talloc.Simo Sorce2009-07-031-6/+8
|
* changes to remove the ambiguity in talloc_free() and talloc_steal() Andrew Tridgell2009-07-011-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These changes follow from the discussions on samba-technical. The changes are in several parts, and stem from the inherent ambiguity that was in talloc_free() and talloc_steal() when the pointer that is being changes has more than one parent, via references. The changes are: 1) when you call talloc_free() on a pointer with more than one parent the free will fail, and talloc will log an error to stderr like this: ERROR: talloc_free with references at some/foo.c:123 reference at other/bar.c:201 reference at other/foobar.c:641 2) Similarly, when you call talloc_steal() on a pointer with more than one parent, the steal will fail and talloc will log an error to stderr like this: ERROR: talloc_steal with references at some/foo.c:123 reference at other/bar.c:201 3) A new function talloc_reparent() has been added to change a parent in a controlled fashion. You need to supply both the old parent and the new parent. It handles the case whether either the old parent was a normal parent or a reference The use of stderr in the logging is ugly (and potentially dangerous), and will be removed in a future patch. We'll need to add a debug registration function to talloc.
* talloc: try to fix the source4 build on AIXStefan Metzmacher2009-06-081-1/+1
| | | | metze
* talloc_array_length: talloc_get_size deals fine with NULLVolker Lendecke2009-03-221-1/+1
|
* Revert "Convert the contents of talloc_guide.txt to doxygen-style talloc.h ↵Volker Lendecke2009-03-221-1023/+1
| | | | | | comments" This reverts commit d21212c9192b41a3fdc7e96cb9bf0125a1dc6c2d.
* Revert "Add a default "undocumented" module"Volker Lendecke2009-03-221-9/+0
| | | | This reverts commit ba42320c7e9f5ccbd32eccbfb1f2d77e13b3a318.
* Revert "Add some initial hook to the front page"Volker Lendecke2009-03-221-3/+0
| | | | This reverts commit cfce2d3611f225244fadf3d27d76371827fd6422.
* Revert "Reformatting"Volker Lendecke2009-03-221-10/+5
| | | | This reverts commit db447d0c476699dbf7fa0567c67f5938674ec811.
* Revert "Document talloc_pool()"Volker Lendecke2009-03-221-35/+0
| | | | This reverts commit 27944ed7452207ef3c686ff6bcd9c4e1cb7f36d8.
* Revert "Add a talloc_internal "module""Volker Lendecke2009-03-221-9/+0
| | | | This reverts commit 02662d56c64f367bffa2febba9a396c15454cfdb.
* Revert "Document _talloc"Volker Lendecke2009-03-221-10/+1
| | | | This reverts commit 2ce70d4f5a30973b4cc083dbbb38b519007a31bd.
* Revert "Document TALLOC_FREE()"Volker Lendecke2009-03-221-10/+0
| | | | This reverts commit 3f81649b8dcadb3bd424f41d803dbd59f770b9ba.