svn commit: samba r2674 - in branches/SAMBA_4_0/source: auth include lib lib/cmdline librpc/rpc

tridge at samba.org tridge at samba.org
Mon Sep 27 04:20:21 GMT 2004


Author: tridge
Date: 2004-09-27 04:20:18 +0000 (Mon, 27 Sep 2004)
New Revision: 2674

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source&rev=2674&nolog=1

Log:
I have realised that talloc() should have its context marked const, as
a const pointer really means that "the data pointed to by this pointer
won't change", and that is certainly true of talloc(). The fact that
some behind-the-scenes meta-data can change doesn't matter from the
point of view of const.

this fixes a number of const warnings caused by const data structures
being passed as talloc contexts. That will no longer generate a
warning.

also changed the talloc leak reporting option from --leak-check to
--leak-report, as all it does is generate a report on exit. A new
--leak-report-full option has been added that shows the complete tree
of memory allocations, which is is quite useful in tracking things down.

NOTE: I find it quite useful to insert talloc_report_full(ptr, stderr)
calls at strategic points in the code while debugging memory
allocation problems, particularly before freeing a major context (such
as the connection context). This allows you to see if that context has
been accumulating too much data, such as per-request data, which
should have been freed when the request finished.

Modified:
   branches/SAMBA_4_0/source/auth/auth_util.c
   branches/SAMBA_4_0/source/include/talloc.h
   branches/SAMBA_4_0/source/lib/cmdline/popt_common.c
   branches/SAMBA_4_0/source/lib/data_blob.c
   branches/SAMBA_4_0/source/lib/talloc.c
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_tcp.c


Changeset:
Sorry, the patch is too large (464 lines) to include; please use WebSVN to see it!
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source&rev=2674&nolog=1


More information about the samba-cvs mailing list