summaryrefslogtreecommitdiffstats
path: root/lib/talloc/talloc.c
Commit message (Collapse)AuthorAgeFilesLines
* report the location of the original talloc_free on double freetalloc-2.0.0Andrew Tridgell2009-09-041-11/+18
| | | | | | | | When we get a double free abort from talloc it is often hard to work out where the first free came from. This patch takes advantage of the fact that _talloc_free() now takes a location the free was called from to allow the double free abort code to print the location of the first free that conflicts.
* talloc: add defines and functions for TALLOC_MAJOR/MINOR_VERSIONStefan Metzmacher2009-08-241-7/+39
| | | | | | | | | | 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-28/+0
| | | | metze
* talloc: remove unused build dependecies to sambaStefan Metzmacher2009-08-241-18/+0
| | | | metze
* talloc: add talloc_set_log_fn() and talloc_set_log_stderr()Stefan Metzmacher2009-08-241-12/+49
| | | | | | | So that the application can setup a log function to get ERROR and WARNING messages. metze
* talloc: let talloc_steal() only generate a warning if it's used with referencesStefan Metzmacher2009-08-241-2/+1
| | | | | | We have to many callers, which rely on that talloc_steal() never fails. metze
* talloc: call return after abort, because an overloaded abort function might ↵Stefan Metzmacher2009-08-241-0/+4
| | | | | | | | | not exit This will be useful in the testsuite, where we could check if an abort would happen. metze
* talloc: report the size of reference handles as 0Stefan Metzmacher2009-08-241-1/+3
| | | | metze
* talloc: let talloc_total_blocks() and talloc_get_size() operate on the ↵Stefan Metzmacher2009-08-241-2/+15
| | | | | | null_context metze
* Fix some warningsVolker Lendecke2009-07-041-2/+3
|
* Restore ABI compatibility for talloc.Simo Sorce2009-07-031-4/+39
|
* talloc: change TALLOC_MAGIC for version 2.0.0Stefan Metzmacher2009-07-021-1/+12
| | | | metze
* a talloc_realloc() to zero size needs to use an unambiguous freeAndrew Tridgell2009-07-011-1/+1
|
* changes to remove the ambiguity in talloc_free() and talloc_steal() Andrew Tridgell2009-07-011-20/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Prevent reallocs of the talloc pool itselfSimo Sorce2009-04-221-0/+5
|
* talloc: add talloc_set_abort_fn()Stefan Metzmacher2009-03-121-4/+31
| | | | metze
* talloc: add talloc_get_type_abort()Stefan Metzmacher2009-03-031-0/+24
| | | | metze
* Move common libraries from root to lib/.Jelmer Vernooij2008-09-171-0/+1732