mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
malloc: Remove max_total_mem member form struct malloc_par
Also note that sumblks in struct mallinfo is always 0. No functional change.
This commit is contained in:
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
2016-02-19 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
|
* malloc/malloc.c (__libc_mallinfo): Update comment.
|
||||||
|
(struct malloc_par): Remove max_total_mem member, it was always 0.
|
||||||
|
(int_mallinfo): Store 0 into usmblks (no functional change).
|
||||||
|
* malloc/hooks.c (struct malloc_state): Document that
|
||||||
|
max_total_mem is always 0.
|
||||||
|
* malloc/malloc.h (struct mallinfo): Dcoument that usmblks is
|
||||||
|
always 0.
|
||||||
|
* manual/memory.texi (Statistics of Malloc): Likewise.
|
||||||
|
|
||||||
2016-02-19 Florian Weimer <fweimer@redhat.com>
|
2016-02-19 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
* malloc/malloc.c (sysmalloc): Do not update arena_max.
|
* malloc/malloc.c (sysmalloc): Do not update arena_max.
|
||||||
|
@ -480,7 +480,7 @@ struct malloc_save_state
|
|||||||
unsigned long mmap_threshold;
|
unsigned long mmap_threshold;
|
||||||
int check_action;
|
int check_action;
|
||||||
unsigned long max_sbrked_mem;
|
unsigned long max_sbrked_mem;
|
||||||
unsigned long max_total_mem;
|
unsigned long max_total_mem; /* Always 0, for backwards compatibility. */
|
||||||
unsigned int n_mmaps;
|
unsigned int n_mmaps;
|
||||||
unsigned int max_n_mmaps;
|
unsigned int max_n_mmaps;
|
||||||
unsigned long mmapped_mem;
|
unsigned long mmapped_mem;
|
||||||
|
@ -649,8 +649,7 @@ libc_hidden_proto (__libc_mallopt)
|
|||||||
have been freed but not use resused or consolidated)
|
have been freed but not use resused or consolidated)
|
||||||
hblks: current number of mmapped regions
|
hblks: current number of mmapped regions
|
||||||
hblkhd: total bytes held in mmapped regions
|
hblkhd: total bytes held in mmapped regions
|
||||||
usmblks: the maximum total allocated space. This will be greater
|
usmblks: always 0
|
||||||
than current total if trimming has occurred.
|
|
||||||
fsmblks: total bytes held in fastbin blocks
|
fsmblks: total bytes held in fastbin blocks
|
||||||
uordblks: current total allocated space (normal or mmapped)
|
uordblks: current total allocated space (normal or mmapped)
|
||||||
fordblks: total free space
|
fordblks: total free space
|
||||||
@ -1743,10 +1742,7 @@ struct malloc_par
|
|||||||
|
|
||||||
/* Statistics */
|
/* Statistics */
|
||||||
INTERNAL_SIZE_T mmapped_mem;
|
INTERNAL_SIZE_T mmapped_mem;
|
||||||
/*INTERNAL_SIZE_T sbrked_mem;*/
|
|
||||||
/*INTERNAL_SIZE_T max_sbrked_mem;*/
|
|
||||||
INTERNAL_SIZE_T max_mmapped_mem;
|
INTERNAL_SIZE_T max_mmapped_mem;
|
||||||
INTERNAL_SIZE_T max_total_mem; /* only kept for NO_THREADS */
|
|
||||||
|
|
||||||
/* First address handed out by MORECORE/sbrk. */
|
/* First address handed out by MORECORE/sbrk. */
|
||||||
char *sbrk_base;
|
char *sbrk_base;
|
||||||
@ -4665,7 +4661,7 @@ int_mallinfo (mstate av, struct mallinfo *m)
|
|||||||
{
|
{
|
||||||
m->hblks = mp_.n_mmaps;
|
m->hblks = mp_.n_mmaps;
|
||||||
m->hblkhd = mp_.mmapped_mem;
|
m->hblkhd = mp_.mmapped_mem;
|
||||||
m->usmblks = mp_.max_total_mem;
|
m->usmblks = 0;
|
||||||
m->keepcost = chunksize (av->top);
|
m->keepcost = chunksize (av->top);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ struct mallinfo
|
|||||||
int smblks; /* number of fastbin blocks */
|
int smblks; /* number of fastbin blocks */
|
||||||
int hblks; /* number of mmapped regions */
|
int hblks; /* number of mmapped regions */
|
||||||
int hblkhd; /* space in mmapped regions */
|
int hblkhd; /* space in mmapped regions */
|
||||||
int usmblks; /* maximum total allocated space */
|
int usmblks; /* always 0, preserved for backwards compatibility */
|
||||||
int fsmblks; /* space available in freed fastbin blocks */
|
int fsmblks; /* space available in freed fastbin blocks */
|
||||||
int uordblks; /* total allocated space */
|
int uordblks; /* total allocated space */
|
||||||
int fordblks; /* total free space */
|
int fordblks; /* total free space */
|
||||||
|
@ -1520,7 +1520,7 @@ This is the total number of chunks allocated with @code{mmap}.
|
|||||||
This is the total size of memory allocated with @code{mmap}, in bytes.
|
This is the total size of memory allocated with @code{mmap}, in bytes.
|
||||||
|
|
||||||
@item int usmblks
|
@item int usmblks
|
||||||
This field is unused.
|
This field is unused and always 0.
|
||||||
|
|
||||||
@item int fsmblks
|
@item int fsmblks
|
||||||
This field is unused.
|
This field is unused.
|
||||||
|
Reference in New Issue
Block a user