summaryrefslogtreecommitdiff
path: root/lib/talloc
AgeCommit message (Collapse)AuthorFilesLines
2011-05-17talloc: splitout _talloc_free_children_internal()Stefan Metzmacher1-50/+27
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue May 17 10:49:13 CEST 2011 on sn-devel-104
2011-05-17talloc: fixed a use after free error in talloc_free_children()Stefan Metzmacher1-1/+16
This is similar to commit 6f51a1f45bf4de062cce7a562477e8140630a53d. metze
2011-05-17talloc: use _talloc_free_internal() in talloc_free_children()Stefan Metzmacher1-1/+1
metze
2011-05-17talloc: test talloc_steal out of a talloc_poolStefan Metzmacher1-0/+69
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue May 17 09:43:01 CEST 2011 on sn-devel-104
2011-05-17talloc: add memset() calls to test_pool()Stefan Metzmacher1-0/+17
This way we the pool based valgrind code. metze
2011-05-17talloc: setup the new 'tc' before TC_UNDEFINE_GROW_CHUNK() _talloc_realloc()Stefan Metzmacher1-0/+1
metze
2011-05-17talloc: make really sure only optimize realloc if there's only one pool chunkStefan Metzmacher1-1/+6
*talloc_pool_objectcount(pool_tc) == 2 doesn't mean the one of the objects is the pool itself! So we better check for == 1 and calculate the chunk count. metze
2011-05-17talloc: make use of _talloc_free_poolmem() in _talloc_realloc()Stefan Metzmacher1-15/+1
This should follow the same logic... metze
2011-05-17talloc: split the handling of FLAG_POOL/FLAG_POOLMEM in _talloc_free_internalStefan Metzmacher1-32/+66
The optimization of the object_count == 1 case should only happen for when we're not destroying the pool itself. And it should only happen if the pool itself is still valid. If the pool isn't valid (it has TALLOC_FLAG_FREE), object_count == 1 does not mean that the pool is the last object, which can happen if you use talloc_steal/move() on memory from the pool and then free the pool itself. Thanks to Volker for noticing this! metze
2011-05-02talloc: use TC_UNDEFINE_SHRINK_CHUNK() instead of ↵Stefan Metzmacher1-1/+36
TC_INVALIDATE_SHRINK_CHUNK() for realloc path If we optimize on top of raw realloc() we need TC_INVALIDATE_SHRINK_CHUNK together with TC_UNDEFINE_GROW_CHUNK (with was missing and caused false positive valgrind warnings). But that is really slow, as we do a lot of talloc_realloc calls in samba. That's why we only to TC_UNDEFINE_SHRINK_CHUNK() for now. metze
2011-04-24Fix license info for talloc in manpage.Jelmer Vernooij1-3/+3
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sun Apr 24 03:27:54 CEST 2011 on sn-devel-104
2011-04-13talloc: fix compiler warnings with -Wc++-compatStefan Metzmacher1-5/+5
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Apr 13 14:33:23 CEST 2011 on sn-devel-104
2011-04-08talloc/testsuite: avoid memory leak reported by valgrindStefan Metzmacher1-1/+1
metze Signed-off-By: Andrew Tridgell <tridge@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Apr 8 10:15:41 CEST 2011 on sn-devel-104
2011-04-08talloc/testsuite: test more talloc_pool related thingsStefan Metzmacher1-0/+55
metze Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08talloc: include valgrind headers if availableStefan Metzmacher1-0/+9
metze Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08talloc: add TC_INVALIDATE_POOL marcoStefan Metzmacher1-3/+38
metze Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08talloc: add TC_UNDEFINE_GROW_CHUNK() marcoStefan Metzmacher1-0/+21
metze Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08talloc: add TC_INVALIDATE_SHRINK_CHUNK() marcoStefan Metzmacher1-0/+28
This invalidates the unused bytes if we shrink memory. metze Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08talloc: add TC_INVALIDATE_FULL_CHUNK() macroStefan Metzmacher1-12/+36
This makes it easier to mark a talloc pointer as invalid. metze Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08talloc: use VALGRIND_MAKE_MEM_UNDEFINED() before memmove()Stefan Metzmacher1-0/+12
metze Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08talloc: optimize talloc_free() and talloc_realloc() for talloc poolsStefan Metzmacher1-22/+138
metze Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08talloc: add TC_POOL_FIRST_CHUNK() macroStefan Metzmacher1-2/+5
metze Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08talloc: add TC_POOL_SPACE_LEFT() macroStefan Metzmacher1-2/+5
metze Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08talloc: add TC_ALIGN16() macroStefan Metzmacher1-2/+3
metze Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08talloc: use TC_HDR_SIZE instead of sizeof(struct talloc_chunk)Stefan Metzmacher1-1/+1
As this includes the padding to 16 bytes. metze Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-04talloc - some documentation changesMatthias Dieter Wallnöfer2-53/+48
- 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
2011-03-30talloc - improve doxygen comment of "talloc_move"Matthias Dieter Wallnöfer1-3/+3
Express better that this should be a pointer of a pointer. Reviewed-by: Tridge
2011-03-15lib: don't install public headers if a private libraryAndrew Tridgell1-0/+1
for talloc/tevent/tdb, only install headers if we are doing a standalone build
2011-03-15talloc: use public_headers to install talloc.h and pytalloc.hAndrew Tridgell1-2/+2
this allows them to be included in the test_headers.h generated header
2011-02-07build: removed the old autogen.sh and autogen-waf.sh scriptsAndrew Tridgell1-11/+0
for the builds that use waf only, these are no longer needed and just cause confusion Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-08waf: ensure "make dist" works from a clean git tree for all librariesAndrew Tridgell1-2/+4
this uses a temporary waf lock file to force the build directory Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Sat Jan 8 02:35:22 CET 2011 on sn-devel-104
2011-01-05talloc: change version to 2.0.5 after a critical bugfixStefan Metzmacher2-1/+63
metze
2011-01-05talloc: fixed a use after free errorAndrew Tridgell1-1/+16
this is the minimal fix for the problem Rusty found. I previously thought that the best fix would be to change tc->parent to be valid for all pointers, but that is expensive for realloc with large numbers of child pointers, which is much more commmon than I expected it to be. Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Wed Jan 5 07:22:27 CET 2011 on sn-devel-104
2011-01-05talloc: added a test for the use after free Rusty foundAndrew Tridgell1-0/+17
2011-01-05talloc: Clarify error message on access after free.Jelmer Vernooij1-4/+4
2011-01-04talloc: Typo fix for api docsBrad Hards1-1/+1
2011-01-03talloc: Fix warnings in test codeBrad Hards3-3/+12
This should not change any behaviour - the intent is just to reduce the "nuisance" warnings. Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Mon Jan 3 11:12:39 CET 2011 on sn-devel-104
2011-01-03Revert broken destructor changes.Jelmer Vernooij1-1/+1
2011-01-03s4-python: Properly call PyObject_Del from all destructors.Jelmer Vernooij1-1/+1
2011-01-01s4-python: Only set BASETYPE flag if subclassing is supported.Jelmer Vernooij1-3/+1
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Jan 1 03:39:58 CET 2011 on sn-devel-104
2011-01-01s4-python: Add more prototypes.Jelmer Vernooij1-0/+2
2011-01-01s4-python: Properly call PyObject_Del from all destructors.Jelmer Vernooij1-1/+1
2011-01-01talloc/tdb/tevent: Remove obsolete signatures files.Jelmer Vernooij1-62/+0
2010-12-24talloc: remove autotools support.Jelmer Vernooij11-3763/+0
2010-12-21talloc: Remove reference to nonexistant configure.developer in autogen.sh.Jelmer Vernooij2-12/+11
2010-12-11talloc: Add ability to generate Python docs using pydoctor.Jelmer Vernooij2-0/+10
2010-12-10build: introduce SAMBA_CHECK_PYTHON_HEADERSMatthieu Patou1-1/+1
This function is a wrapper around waf's check_python_header. It avoids searching more than once for the headers bringing a small speed improvement and a better lisibility of the logs. But it's mainly to avoid a nasty bug when python libraries are in path pointed by python_LIBPL (ie. /usr/local/lib/python2.6/config/) instead of python_LIBDIR (ie. /usr/local/lib). On the first call waf will correctly find that in order to link with python libs it needs to add -L$python_LIBPL. But on the next calls of check_python_headers, waf will use both the current library path value (ie. -L/usr/local/lib/python2.6/config) and -L$python_LIBDIR (ie. /usr/local/lib/) which will make him beleive that python libraries are in $python_LIBDIR which at the end will make the final link test fails in check_python_headers as it will not use the good directory. So by avoiding calling check_python_headers more than once we avoid making waf fooling itself.
2010-12-09talloc: pytalloc-util should not have an ABI-file yetStefan Metzmacher1-2/+0
Somehow I forgot to remove this after discussion with Jelmer. metze
2010-12-09waf: remove the restriction that private libraries must not have a vnumAndrew Tridgell1-4/+2
we need the vnum for ABI checking for public libraries built as private libraries when bundled Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Dec 9 12:47:41 CET 2010 on sn-devel-104
2010-12-09waf-abi: auto-generate per-symbol versions from ABI filesAndrew Tridgell1-2/+2
This changes our version-script generation to use the ABI files that are saved in git with each version number change of our public libraries. We use these ABI files to generate a linker version script that gives the exact version number that each symbol was introduced. This provides us with automatic fine grained symbol versioning. Pair-Programmed-With: Jelmer Vernooij <jelmer@samba.org> Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>