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

327 Commits

Author SHA1 Message Date
Volker Lendecke
ccf33dd054 talloc: Avoid some "else" by doing early returns
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-18 11:36:28 -07:00
Volker Lendecke
d3928b0c8a talloc: Fix nonblank line endings
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-18 11:36:14 -07:00
Karolin Seeger
4af921fe88 lib/talloc: Move manpage to man/.
Trying to be more consistent.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
2012-12-03 14:35:11 +01:00
Karolin Seeger
174ab3542d docs: man talloc: Add missing meta data.
This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
2012-11-29 13:41:43 +01:00
Simo Sorce
36ea39edf8 talloc: Convert error cecking macros into fns
This will avoid 'surprise returns' and makes the code cleare to readers.
These macros were complex enough to warrant a full function anyway not
just for readability but also for debuggability.

Thanks David for pointing out this issue.

Autobuild-User(master): Simo Sorce <idra@samba.org>
Autobuild-Date(master): Fri Oct  5 23:24:17 CEST 2012 on sn-devel-104
2012-10-05 23:24:17 +02:00
Simo Sorce
7d7e33c624 Add tests for talloc_memlimit
Autobuild-User(master): Simo Sorce <idra@samba.org>
Autobuild-Date(master): Fri Oct  5 07:36:38 CEST 2012 on sn-devel-104
2012-10-05 07:36:38 +02:00
Simo Sorce
a33a78c302 Add memory limiting capability to talloc
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.
2012-10-05 05:57:17 +02:00
Andreas Schneider
41cffa3c8b doc: Remove build/ from doxygen config or it will not work in brew.
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Sat Aug  4 16:31:22 CEST 2012 on sn-devel-104
2012-08-04 16:31:22 +02:00
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