svn commit: samba r17176 - in branches/SAMBA_4_0/source/lib/talloc:
.
metze at samba.org
metze at samba.org
Fri Jul 21 10:34:11 GMT 2006
Author: metze
Date: 2006-07-21 10:34:10 +0000 (Fri, 21 Jul 2006)
New Revision: 17176
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17176
Log:
remove off_t from talloc. size_t is large enough to hold
the max amount of memory of one process
metze
Modified:
branches/SAMBA_4_0/source/lib/talloc/config.m4
branches/SAMBA_4_0/source/lib/talloc/talloc.3.xml
branches/SAMBA_4_0/source/lib/talloc/talloc.c
branches/SAMBA_4_0/source/lib/talloc/talloc.h
branches/SAMBA_4_0/source/lib/talloc/talloc_guide.txt
Changeset:
Modified: branches/SAMBA_4_0/source/lib/talloc/config.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/talloc/config.m4 2006-07-21 08:27:37 UTC (rev 17175)
+++ branches/SAMBA_4_0/source/lib/talloc/config.m4 2006-07-21 10:34:10 UTC (rev 17176)
@@ -8,9 +8,7 @@
AC_CHECK_TYPE(intptr_t, unsigned long long)
AC_CHECK_HEADERS(stdint.h stdarg.h unistd.h sys/types.h)
-AC_CHECK_SIZEOF(off_t,cross)
AC_CHECK_SIZEOF(size_t,cross)
-AC_CHECK_SIZEOF(ssize_t,cross)
AC_CHECK_SIZEOF(void *,cross)
if test $ac_cv_sizeof_size_t -lt $ac_cv_sizeof_void_p; then
Modified: branches/SAMBA_4_0/source/lib/talloc/talloc.3.xml
===================================================================
--- branches/SAMBA_4_0/source/lib/talloc/talloc.3.xml 2006-07-21 08:27:37 UTC (rev 17175)
+++ branches/SAMBA_4_0/source/lib/talloc/talloc.3.xml 2006-07-21 10:34:10 UTC (rev 17176)
@@ -364,7 +364,7 @@
data if you do this.
</para>
</refsect2>
- <refsect2><title>off_t talloc_total_size(const void *<emphasis role="italic">ptr</emphasis>);</title>
+ <refsect2><title>size_t talloc_total_size(const void *<emphasis role="italic">ptr</emphasis>);</title>
<para>
The talloc_total_size() function returns the total size in bytes
used by this pointer and all child pointers. Mostly useful for
@@ -376,7 +376,7 @@
talloc_enable_leak_report_full() has been called.
</para>
</refsect2>
- <refsect2><title>off_t talloc_total_blocks(const void *<emphasis role="italic">ptr</emphasis>);</title>
+ <refsect2><title>size_t talloc_total_blocks(const void *<emphasis role="italic">ptr</emphasis>);</title>
<para>
The talloc_total_blocks() function returns the total memory block
count used by this pointer and all child pointers. Mostly useful
Modified: branches/SAMBA_4_0/source/lib/talloc/talloc.c
===================================================================
--- branches/SAMBA_4_0/source/lib/talloc/talloc.c 2006-07-21 08:27:37 UTC (rev 17175)
+++ branches/SAMBA_4_0/source/lib/talloc/talloc.c 2006-07-21 10:34:10 UTC (rev 17176)
@@ -735,11 +735,11 @@
/*
return the total size of a talloc pool (subtree)
*/
-off_t talloc_total_size(const void *ptr)
+size_t talloc_total_size(const void *ptr)
{
- off_t total = 0;
+ size_t total = 0;
struct talloc_chunk *c, *tc;
-
+
if (ptr == NULL) {
ptr = null_context;
}
@@ -768,9 +768,9 @@
/*
return the total number of blocks in a talloc pool (subtree)
*/
-off_t talloc_total_blocks(const void *ptr)
+size_t talloc_total_blocks(const void *ptr)
{
- off_t total = 0;
+ size_t total = 0;
struct talloc_chunk *c, *tc = talloc_chunk_from_ptr(ptr);
if (tc->flags & TALLOC_FLAG_LOOP) {
Modified: branches/SAMBA_4_0/source/lib/talloc/talloc.h
===================================================================
--- branches/SAMBA_4_0/source/lib/talloc/talloc.h 2006-07-21 08:27:37 UTC (rev 17175)
+++ branches/SAMBA_4_0/source/lib/talloc/talloc.h 2006-07-21 10:34:10 UTC (rev 17176)
@@ -119,8 +119,8 @@
int talloc_free(void *ptr);
void *_talloc_realloc(const void *context, void *ptr, size_t size, const char *name);
void *_talloc_steal(const void *new_ctx, const void *ptr);
-off_t talloc_total_size(const void *ptr);
-off_t talloc_total_blocks(const void *ptr);
+size_t talloc_total_size(const void *ptr);
+size_t talloc_total_blocks(const void *ptr);
void talloc_report_full(const void *ptr, FILE *f);
void talloc_report(const void *ptr, FILE *f);
void talloc_enable_null_tracking(void);
Modified: branches/SAMBA_4_0/source/lib/talloc/talloc_guide.txt
===================================================================
--- branches/SAMBA_4_0/source/lib/talloc/talloc_guide.txt 2006-07-21 08:27:37 UTC (rev 17175)
+++ branches/SAMBA_4_0/source/lib/talloc/talloc_guide.txt 2006-07-21 10:34:10 UTC (rev 17176)
@@ -318,7 +318,7 @@
talloc_steal (new_ctx, NULL) will return NULL with no sideeffects.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-off_t talloc_total_size(const void *ptr);
+size_t talloc_total_size(const void *ptr);
The talloc_total_size() function returns the total size in bytes used
by this pointer and all child pointers. Mostly useful for debugging.
@@ -329,7 +329,7 @@
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-off_t talloc_total_blocks(const void *ptr);
+size_t talloc_total_blocks(const void *ptr);
The talloc_total_blocks() function returns the total memory block
count used by this pointer and all child pointers. Mostly useful for
More information about the samba-cvs
mailing list