summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/talloc/config.m42
-rw-r--r--source4/lib/talloc/talloc.3.xml4
-rw-r--r--source4/lib/talloc/talloc.c10
-rw-r--r--source4/lib/talloc/talloc.h4
-rw-r--r--source4/lib/talloc/talloc_guide.txt4
5 files changed, 11 insertions, 13 deletions
diff --git a/source4/lib/talloc/config.m4 b/source4/lib/talloc/config.m4
index bbb2b35af8..53066333d2 100644
--- a/source4/lib/talloc/config.m4
+++ b/source4/lib/talloc/config.m4
@@ -8,9 +8,7 @@ fi
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
diff --git a/source4/lib/talloc/talloc.3.xml b/source4/lib/talloc/talloc.3.xml
index 7b254ae7c7..ef032f8426 100644
--- a/source4/lib/talloc/talloc.3.xml
+++ b/source4/lib/talloc/talloc.3.xml
@@ -364,7 +364,7 @@ talloc_realloc(ctx, ptr, type, 0) ==> talloc_free(ptr);</programlisting>
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_realloc(ctx, ptr, type, 0) ==> talloc_free(ptr);</programlisting>
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
diff --git a/source4/lib/talloc/talloc.c b/source4/lib/talloc/talloc.c
index 2ebaafbb83..ca76b05332 100644
--- a/source4/lib/talloc/talloc.c
+++ b/source4/lib/talloc/talloc.c
@@ -735,11 +735,11 @@ void *_talloc_steal(const void *new_ctx, const void *ptr)
/*
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 @@ off_t talloc_total_size(const void *ptr)
/*
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) {
diff --git a/source4/lib/talloc/talloc.h b/source4/lib/talloc/talloc.h
index a4eef14bd0..7591b6f318 100644
--- a/source4/lib/talloc/talloc.h
+++ b/source4/lib/talloc/talloc.h
@@ -119,8 +119,8 @@ void *talloc_init(const char *fmt, ...) PRINTF_ATTRIBUTE(1,2);
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);
diff --git a/source4/lib/talloc/talloc_guide.txt b/source4/lib/talloc/talloc_guide.txt
index 1068e5d1cd..5aa8dfa24f 100644
--- a/source4/lib/talloc/talloc_guide.txt
+++ b/source4/lib/talloc/talloc_guide.txt
@@ -318,7 +318,7 @@ as to your sanity or the safety of your data if you do this.
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 @@ been called.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-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