1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

319 Commits

Author SHA1 Message Date
Rusty Russell
4f331872bc talloc: don't allow a talloc_pool inside a talloc_pool.
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>
2012-07-18 04:54:31 +09:30
Rusty Russell
8893215aaf talloc: use a struct for pool headers.
This neatens the code a bit (we should do a similar thing for all the
TALLOC_CHUNK macros).

Two subtler changes:
(1) As a result of the struct, we actually pack object_count into the 
    talloc header on 32-bit platforms (since the header is 40 bytes, but
    needs to be 16-byte aligned).
(2) I avoid VALGRIND_MAKE_MEM_UNDEFINED on memmove when we resize the
    only entry in a pool; that's done later anyway.

With -O2 on my 11.04 Ubuntu 32-bit x86 laptop, the talloc_pool speed as
measured by testsuite.c actually increases 10%.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 04:53:31 +09:30
Björn Jacke
7abe51f840 talloc: remove unused variables
found by the IRIX compiler

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Thu Jul  5 23:50:54 CEST 2012 on sn-devel-104
2012-07-05 23:50:54 +02:00
Andrew Bartlett
ccb7642e5b build: Remove unused release scripts for talloc
These now use waf dist, and the script/librelease.sh script as a wrapper.

The mksyms.sh call in the source3/Makefile uses the copy in source3/script

Andrew Bartlett
2012-05-30 04:15:11 +02:00
Andreas Schneider
5909188492 talloc: Update doxygen config.
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Mon May  7 21:13:15 CEST 2012 on sn-devel-104
2012-05-07 21:13:15 +02:00
Pavel Březina
20408286e2 doc: Remove latex to doxygen conversion leftovers in talloc.
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-05-07 19:20:30 +02:00
Andreas Schneider
69526997e5 doc: Fixes for the talloc best practices tutorial. 2012-05-07 19:20:30 +02:00
Andreas Schneider
c1c9ab1c79 doc: Fixes for the talloc debugging tutorial. 2012-05-07 19:20:30 +02:00
Andreas Schneider
5a758f448d doc: Fixes for the talloc pool tutorial. 2012-05-07 19:20:29 +02:00
Andreas Schneider
79efc9d6e2 doc: Fixes for the talloc destructor tutorial. 2012-05-07 19:20:29 +02:00
Andreas Schneider
7d5565e22d doc: Fixes for the talloc dynamic type system tutorial. 2012-05-07 19:20:29 +02:00
Andreas Schneider
dc112dcee0 doc: Fixes for the talloc stealing tutorial. 2012-05-07 19:20:29 +02:00
Andreas Schneider
9423ac06aa doc: Fixes for the talloc context tutorial. 2012-05-07 19:20:29 +02:00
Pavel Březina
d99b7d0220 doc: Add talloc tutorial.
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-05-07 19:20:29 +02:00
Volker Lendecke
8d5e6770f4 talloc: Fix copy&paste errors 2012-04-24 13:28:44 +02:00
Pavel Březina
bdeee2202d Talloc doc: talloc_strdup_append does not return duplicated string 2012-04-24 13:28:38 +02:00
Pavel Březina
9a474717b8 Talloc doc: when s == NULL in _append functions 2012-04-24 13:28:34 +02:00
Volker Lendecke
c4c8845930 Talloc doc: Fix a cut&paste error
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Wed Apr 18 11:59:49 CEST 2012 on sn-devel-104
2012-04-18 11:59:49 +02:00
Pavel Březina
64fdcda0c7 Talloc doc: talloc_pool() when not enough memory in the pool 2012-04-18 10:27:17 +02:00
Pavel Březina
75bcb28a95 Talloc doc: TALLOC_FREE_FILL 2012-04-18 10:27:16 +02:00
Pavel Březina
f8b589b793 Talloc doc: talloc_set_log_stderr()
Documents this function.
2012-04-18 10:27:16 +02:00
Pavel Březina
cf7f4612b5 Talloc doc: talloc_set_log_fn()
Documents this function.
2012-04-18 10:27:16 +02:00
Pavel Březina
73b0ed650a Talloc doc: talloc_set_abort_fn()
Documents this function.
2012-04-18 10:27:16 +02:00
Pavel Březina
30ca3915e5 Talloc doc: talloc_asprintf_append_buffer()
Explains the difference between _append and _append_buffer.
2012-04-18 10:27:16 +02:00
Pavel Březina
50689aee38 Talloc doc: talloc_strndup_append_buffer()
Explains the difference between _append and _append_buffer.
2012-04-18 10:27:16 +02:00
Pavel Březina
c5243a499f Talloc doc: talloc_strndup_append()
The destination string is reallocated instead of duplicating the result.
2012-04-18 10:27:15 +02:00
Pavel Březina
3502371a34 Talloc doc: talloc_strdup_append_buffer()
Explains the difference between _append and _append_buffer.
2012-04-18 10:27:15 +02:00
Pavel Březina
b233173f85 Talloc doc: talloc_strdup_append()
The destination string is reallocated instead of duplicating the result.
2012-04-18 10:27:15 +02:00
Stefan Metzmacher
91ffcdd5a9 talloc/testsuite: fix compiler warnings
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jan 10 13:31:33 CET 2012 on sn-devel-104
2012-01-10 13:31:33 +01:00
Volker Lendecke
ad3c0e03e2 talloc: Slightly simplify talloc_unlink
Nested if's are hard to understand to me.

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Jan  2 19:07:23 CET 2012 on sn-devel-104
2012-01-02 19:07:23 +01:00
Volker Lendecke
0bee8719b2 talloc: Fix a typo 2012-01-02 14:59:59 +01:00
Jelmer Vernooij
86afe83d86 waf: Factor checking for undefined symbol flags out into separate method.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Nov 13 19:38:38 CET 2011 on sn-devel-104
2011-11-13 19:38:38 +01:00
Jelmer Vernooij
39ba9b93d7 talloc: Only check for pkg-config file when checking for system talloc. 2011-11-13 18:06:06 +01:00
Jelmer Vernooij
22c88fbc1d pytalloc-util: Don't mark as python extension, use pyembed instead. 2011-11-13 18:06:06 +01:00
Michael Adam
6560bca57e talloc: fix a comment typo 2011-10-26 02:44:02 +02:00
Stefan Metzmacher
6b06b0d3b4 talloc: simplifiy the logic to build talloc_testsuite in the standalone build
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Oct 22 13:15:52 CEST 2011 on sn-devel-104
2011-10-22 13:15:52 +02:00
Stefan Metzmacher
04fd3a9d69 talloc/testsuite: remove #if _SAMBA_BUILD_==3
We don't include "includes.h" anymore...

metze
2011-10-22 09:28:26 +02:00
Stefan Metzmacher
94bebb96c5 talloc: change version to 2.0.7
The version change is needed because the ABI file
of the pytalloc code was fixed.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Sep 15 22:32:59 CEST 2011 on sn-devel-104
2011-09-15 22:32:59 +02:00
Volker Lendecke
4ee613ba64 talloc: Remove an unused variable
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Sep  7 16:47:26 CEST 2011 on sn-devel-104
2011-09-07 16:47:26 +02:00
Jelmer Vernooij
9fa8f27ed8 talloc: Fix talloc-compat pc files/headers.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Aug 21 04:53:07 CEST 2011 on sn-devel-104
2011-08-21 04:53:07 +02:00
Jelmer Vernooij
31912781ca wafsamba: Only install .pc files if libraries are public. 2011-08-21 03:22:05 +02:00
Jelmer Vernooij
4b94926ac3 pytalloc: Regenerate ABI file.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Wed Aug 10 16:51:11 CEST 2011 on sn-devel-104
2011-08-10 16:51:11 +02:00
Jelmer Vernooij
f8ec7f6cb1 pytalloc: Use consistent prefix for functions, add ABI file. 2011-08-10 15:36:21 +02:00
Andrew Tridgell
abd2e25ee0 talloc: prepare for 2.0.6 release
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Aug  9 04:03:49 CEST 2011 on sn-devel-104
2011-08-09 04:03:49 +02:00
Andrew Tridgell
cf986f2008 talloc: ensure the sibling linked list remains valid during a free
This ensures that the sibling list of a pointer doesn't become invalid
during a free operation. It is an alternative fix to the fix in
6f51a1f45b, and avoids the problem of
trying to calculate the parent pointer early

This should fix the subtle spoolss talloc bug that Simo found

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Aug  9 01:53:17 CEST 2011 on sn-devel-104
2011-08-09 01:53:16 +02:00
Andrew Tridgell
73677875b4 talloc: check block count aftter references test
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-04 16:17:25 +10:00
Andrew Tridgell
d004fd0b53 talloc: added test suite for talloc_free_children()
this tests the fix from Simo

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Jul 29 11:30:13 CEST 2011 on sn-devel-104
2011-07-29 11:30:13 +02:00
Simo Sorce
52182a5281 talloc: preserve context name on talloc_free_children()
Otherwise tc->name will end up pointing to garbage when it is not
set to a const but rather to a string allocate as child of the context itself.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-29 18:17:44 +10:00
Jelmer Vernooij
78b54e9ee1 talloc: Support PYTHON environment variable.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Jul 26 22:21:30 CEST 2011 on sn-devel-104
2011-07-26 22:21:30 +02:00
Stefan Metzmacher
df2cb2f672 talloc: splitout _talloc_free_children_internal()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue May 17 10:49:13 CEST 2011 on sn-devel-104
2011-05-17 10:49:13 +02:00