mirror of
https://github.com/samba-team/samba.git
synced 2025-03-12 20:58:37 +03:00
r17176: remove off_t from talloc. size_t is large enough to hold
the max amount of memory of one process metze (This used to be commit f47b7bb656c8854c16c5a28ba24d18eeb22b6e22)
This commit is contained in:
parent
5f741e17d7
commit
550f5fb26e
@ -8,9 +8,7 @@ fi
|
|||||||
|
|
||||||
AC_CHECK_TYPE(intptr_t, unsigned long long)
|
AC_CHECK_TYPE(intptr_t, unsigned long long)
|
||||||
AC_CHECK_HEADERS(stdint.h stdarg.h unistd.h sys/types.h)
|
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(size_t,cross)
|
||||||
AC_CHECK_SIZEOF(ssize_t,cross)
|
|
||||||
AC_CHECK_SIZEOF(void *,cross)
|
AC_CHECK_SIZEOF(void *,cross)
|
||||||
|
|
||||||
if test $ac_cv_sizeof_size_t -lt $ac_cv_sizeof_void_p; then
|
if test $ac_cv_sizeof_size_t -lt $ac_cv_sizeof_void_p; then
|
||||||
|
@ -364,7 +364,7 @@ talloc_realloc(ctx, ptr, type, 0) ==> talloc_free(ptr);</programlisting>
|
|||||||
data if you do this.
|
data if you do this.
|
||||||
</para>
|
</para>
|
||||||
</refsect2>
|
</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>
|
<para>
|
||||||
The talloc_total_size() function returns the total size in bytes
|
The talloc_total_size() function returns the total size in bytes
|
||||||
used by this pointer and all child pointers. Mostly useful for
|
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.
|
talloc_enable_leak_report_full() has been called.
|
||||||
</para>
|
</para>
|
||||||
</refsect2>
|
</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>
|
<para>
|
||||||
The talloc_total_blocks() function returns the total memory block
|
The talloc_total_blocks() function returns the total memory block
|
||||||
count used by this pointer and all child pointers. Mostly useful
|
count used by this pointer and all child pointers. Mostly useful
|
||||||
|
@ -735,9 +735,9 @@ void *_talloc_steal(const void *new_ctx, const void *ptr)
|
|||||||
/*
|
/*
|
||||||
return the total size of a talloc pool (subtree)
|
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;
|
struct talloc_chunk *c, *tc;
|
||||||
|
|
||||||
if (ptr == NULL) {
|
if (ptr == NULL) {
|
||||||
@ -768,9 +768,9 @@ off_t talloc_total_size(const void *ptr)
|
|||||||
/*
|
/*
|
||||||
return the total number of blocks in a talloc pool (subtree)
|
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);
|
struct talloc_chunk *c, *tc = talloc_chunk_from_ptr(ptr);
|
||||||
|
|
||||||
if (tc->flags & TALLOC_FLAG_LOOP) {
|
if (tc->flags & TALLOC_FLAG_LOOP) {
|
||||||
|
@ -119,8 +119,8 @@ void *talloc_init(const char *fmt, ...) PRINTF_ATTRIBUTE(1,2);
|
|||||||
int talloc_free(void *ptr);
|
int talloc_free(void *ptr);
|
||||||
void *_talloc_realloc(const void *context, void *ptr, size_t size, const char *name);
|
void *_talloc_realloc(const void *context, void *ptr, size_t size, const char *name);
|
||||||
void *_talloc_steal(const void *new_ctx, const void *ptr);
|
void *_talloc_steal(const void *new_ctx, const void *ptr);
|
||||||
off_t talloc_total_size(const void *ptr);
|
size_t talloc_total_size(const void *ptr);
|
||||||
off_t talloc_total_blocks(const void *ptr);
|
size_t talloc_total_blocks(const void *ptr);
|
||||||
void talloc_report_full(const void *ptr, FILE *f);
|
void talloc_report_full(const void *ptr, FILE *f);
|
||||||
void talloc_report(const void *ptr, FILE *f);
|
void talloc_report(const void *ptr, FILE *f);
|
||||||
void talloc_enable_null_tracking(void);
|
void talloc_enable_null_tracking(void);
|
||||||
|
@ -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.
|
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
|
The talloc_total_size() function returns the total size in bytes used
|
||||||
by this pointer and all child pointers. Mostly useful for debugging.
|
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
|
The talloc_total_blocks() function returns the total memory block
|
||||||
count used by this pointer and all child pointers. Mostly useful for
|
count used by this pointer and all child pointers. Mostly useful for
|
||||||
|
Loading…
x
Reference in New Issue
Block a user