1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-22 16:23:49 +03:00
Commit Graph

49 Commits

Author SHA1 Message Date
Andrew Tridgell
5760ed20ee r7781: finding the parent of a talloc ptr is trickier than it looks due to the two-way
tree nature of the data structure. I think I've finally got it right

also added talloc_show_parents() for debugging
2007-10-10 13:18:36 -05:00
Andrew Tridgell
ee3fe42fb1 r7780: fixed a bug in talloc_find_parent_byname() 2007-10-10 13:18:35 -05:00
Andrew Tridgell
bdb55c7a10 r7778: added talloc_find_parent_bytype() and talloc_find_parent_byname()
These provide a way to find a parent of a ptr that is of a given
type. I will be using this to find the event context in smbd, relying
on the fact that everything is a child of the top level event
context. I did look at the alternatives, and found that passing the
event context to just about every call in smbd was getting way too
complex (we need to get it to anything that can do a ldb operation, as
that can invoke ldap).

So this method avoids a global, and seems to work nicely
2007-10-10 13:18:35 -05:00
Derrell Lipman
77fc2036a0 r7556: fixed typo in documentation 2007-10-10 13:18:08 -05:00
Andrew Tridgell
257027a571 r6845: make the talloc header align to 40 bytes, which costs us an extra 4
bytes per allocation, but makes it much more portable
2007-10-10 13:16:50 -05:00
Andrew Tridgell
aac86583a9 r6831: talloc now requires config.h (this fixes ldb build) 2007-10-10 13:16:49 -05:00
Andrew Tridgell
57c8db4f9a r6830: put header checks in config.m4 so when it is included by other projects the right
configure checks are done
2007-10-10 13:16:48 -05:00
Jelmer Vernooij
f46c532883 r6828: More portability fixes 2007-10-10 13:16:48 -05:00
Andrew Tridgell
450ac2e4de r6812: more talloc portability tweaks 2007-10-10 13:16:46 -05:00
Andrew Tridgell
c8a274c873 r6808: - test for gcov not needed
- samba malloc wrapper avoidance not needed now we don't use includes.h

- make testsuite work when BOOL, True, False already defined
2007-10-10 13:16:46 -05:00
Jelmer Vernooij
3541ebe31b r6807: Fix in-tree build of talloc testsuite 2007-10-10 13:16:46 -05:00
Jelmer Vernooij
c2ce09d380 r6804: Add config.h for talloc (and use it) 2007-10-10 13:16:45 -05:00
Andrew Tridgell
235f5c510b r6802: - fixed CFLAGS
- don't fail if we don't have xsltproc
2007-10-10 13:16:45 -05:00
Andrew Tridgell
7af0c547e0 r6741: prevent talloc_strndup() from reading one byte past the end of a buffer,
giving valgrind errors
2007-10-10 13:16:40 -05:00
Jelmer Vernooij
cbd7af4fcf r6664: Obey overrided CC in the Makefile
(should fix build on several buildfarm hosts)
2007-10-10 13:16:33 -05:00
Andrew Tridgell
b7fbe2173d r6663: only use -Wall for gcc 2007-10-10 13:16:33 -05:00
Andrew Tridgell
2f78428cfd r6662: add an installcheck target for talloc 2007-10-10 13:16:33 -05:00
Andrew Tridgell
9318744fd4 r6661: fix up talloc autoconf to have a chance of working on the build farm 2007-10-10 13:16:32 -05:00
Volker Lendecke
777c489cad r6660: Sorry for the spam... I think now I've got a version that should compile on
trunk, 3_0 and 4_0.

Volker
2007-10-10 13:16:32 -05:00
Simo Sorce
34671674ee r6650: keep style consistent 2007-10-10 13:16:32 -05:00
Simo Sorce
df40184782 r6645: Add talloc_get_size() function.
Sometimes it is usefull to know this data.

Simo.
2007-10-10 13:16:32 -05:00
Jelmer Vernooij
62550eac1e r6622: Add talloc manpage in DocBook XML, based on SGML version by Garry Williams 2007-10-10 13:16:32 -05:00
Volker Lendecke
9fa26d2c97 r6513: Commit talloc_free_children.
Volker
2007-10-10 13:16:21 -05:00
Jelmer Vernooij
c8e1b75427 r6478: Add 'make install' and a pkg-config file 2007-10-10 13:16:18 -05:00
Jelmer Vernooij
5ca8a85206 r6477: Remove call to autoheader as autogenerated header files are not used
by talloc
2007-10-10 13:16:18 -05:00
Andrew Tridgell
27b987d267 r6474: - added a simple talloc web page at http://talloc.samba.org/
- make it easier to seperataly build talloc for other projects
2007-10-10 13:11:40 -05:00
Andrew Tridgell
40b8ee186a r6075: added talloc_enable_null_tracking() (asked for by lifeless) 2007-10-10 13:11:17 -05:00
Andrew Bartlett
48c5187967 r6033: Patch from 'lifeless' to clarify behaviour with NULL pointers.
Andrew Bartlett
2007-10-10 13:11:16 -05:00
Andrew Tridgell
301cbb0d12 r5939: improve talloc_realloc() docs after feedback from lifeless 2007-10-10 13:11:10 -05:00
Andrew Tridgell
3060b26c9e r5938: - allow NULL string argument to talloc_vasprintf_append()
- default to using va_copy(), thus assuming a modern libc
2007-10-10 13:11:10 -05:00
Andrew Tridgell
e25aa54e96 r5937: - performance improvement to talloc_asprintf_append()
- allow standalone talloc to use gcc printf attributes
2007-10-10 13:11:10 -05:00
Stefan Metzmacher
d8aeb69ea8 r5142: fix compiler warning
metze
2007-10-10 13:09:27 -05:00
Andrew Tridgell
e73e49aaa6 r5119: fflush after talloc reports to ensure they are fully on disk when using tee 2007-10-10 13:09:24 -05:00
Andrew Tridgell
ad1af519eb r4793: minor doc updates 2007-10-10 13:08:55 -05:00
Andrew Tridgell
c283e1a3ef r4790: added type checking helper macros in talloc. These take advantage of
the type names that talloc already keeps around for pointers, and
allows the user to type check void* private pointers. It can also be
used to implement polymorphism in C, as I'm sure someone would have
pointed out to me sooner or later :-)
2007-10-10 13:08:55 -05:00
Andrew Tridgell
603ef69be0 r4718: don't use the deprecated __va_copy() unless va_copy() is unavailable 2007-10-10 13:08:47 -05:00
Andrew Tridgell
4ec47cc108 r4711: - deprecate talloc_destroy()
- expanded the talloc_realloc() test a little (I was concerned about a
  possible bug, which turned out to be an illusion)

- don't enable gcov by default in Makefile.talloc
2007-10-10 13:08:46 -05:00
Stefan Metzmacher
9b9501bc03 r4689: - make talloc_report_depth() public
- add talloc_parent() to return the parent context of a pointer

these are very use full for debuging

metze
2007-10-10 13:08:43 -05:00
Stefan Metzmacher
4ab63d5479 r4688: don't run male proto for lib/talloc/
metze
2007-10-10 13:08:43 -05:00
Stefan Metzmacher
a88aac7a39 r4687: use struct type and location for easier finding
metze
2007-10-10 13:08:43 -05:00
Stefan Metzmacher
11e006df16 r4609: add a usefull data_blob_dup_talloc() macro
metze
2007-10-10 13:08:33 -05:00
Andrew Tridgell
2fe0e2528f r4593: don't use the _p function in the testsuite, as when built standalone it doesn't
use TALLOC_DEPRECATED
2007-10-10 13:08:30 -05:00
Andrew Tridgell
1177200dd9 r4592: fixed typo from talloc testsuite fixup for the new syntax 2007-10-10 13:08:30 -05:00
Andrew Tridgell
6e7754abd0 r4591: - converted the other _p talloc functions to not need _p
- added #if TALLOC_DEPRECATED around the _p functions

- fixes the code that broke from the above

while doing this I fixed quite a number of places that were
incorrectly using the non type-safe talloc functions to use the type
safe ones. Some were even doing multiplies for array allocation, which
is potentially unsafe.
2007-10-10 13:08:30 -05:00
Andrew Tridgell
2011bbeb84 r4550: talloc() is now typesafe. It is exactly equivalent to the old talloc_p() macro. Use
talloc_size() if you want the old behaviour.

I have kept talloc_p() as an alias for now. Once we change all calls
to be plain talloc() then we can remove it.
2007-10-10 13:08:26 -05:00
Andrew Tridgell
89b74b5354 r4549: got rid of a lot more uses of plain talloc(), instead using
talloc_size() or talloc_array_p() where appropriate.

also fixed a memory leak in pvfs_copy_file() (failed to free a memory
context)
2007-10-10 13:08:25 -05:00
Andrew Tridgell
e6c81d7c9f r4547: - added talloc_new(ctx) macro that is a neater form of the common talloc(ctx, 0) call.
- cleaned up some talloc usage in various files

I'd like to get to the point that we have no calls to talloc(), at
which point we will rename talloc_p() to talloc(), to encourage
everyone to use the typesafe functions.
2007-10-10 13:08:20 -05:00
Andrew Tridgell
cf73dda652 r4479: added the function talloc_autofree_context() which returns a talloc context that
will automatically be freed on program exit. This is useful for reducing
clutter in leak reports
2007-10-10 13:08:10 -05:00
Andrew Tridgell
98b5f73c1b r4473: - moved talloc into its own lib/talloc/ area
- added gcov flags to Makefile.talloc

- expanded talloc testsuite to add a test for realloc with a child ptr

- fixed a bug in talloc_realloc() with realloc of a ptr that has child ptrs
2007-10-10 13:07:55 -05:00