mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
Update.
2003-09-08 Wolfram Gloger <wg@malloc.de> * malloc/malloc.c (sYSMALLOc): Move foreign sbrk accounting into contiguous case. Bug report from Prem Gopalan <prem@mazunetworks.com>. (mALLOPt): Avoid requirement of C99.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2003-09-08 Wolfram Gloger <wg@malloc.de>
|
||||||
|
|
||||||
|
* malloc/malloc.c (sYSMALLOc): Move foreign sbrk accounting into
|
||||||
|
contiguous case. Bug report from Prem Gopalan
|
||||||
|
<prem@mazunetworks.com>.
|
||||||
|
(mALLOPt): Avoid requirement of C99.
|
||||||
|
|
||||||
2003-09-08 Ulrich Drepper <drepper@redhat.com>
|
2003-09-08 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* libio/bug-ftell.c: Include <sys/types.h>.
|
* libio/bug-ftell.c: Include <sys/types.h>.
|
||||||
|
@@ -2969,9 +2969,6 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
else {
|
else {
|
||||||
/* Count foreign sbrk as system_mem. */
|
|
||||||
if (old_size)
|
|
||||||
av->system_mem += brk - old_end;
|
|
||||||
front_misalign = 0;
|
front_misalign = 0;
|
||||||
end_misalign = 0;
|
end_misalign = 0;
|
||||||
correction = 0;
|
correction = 0;
|
||||||
@@ -2980,6 +2977,10 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av;
|
|||||||
/* handle contiguous cases */
|
/* handle contiguous cases */
|
||||||
if (contiguous(av)) {
|
if (contiguous(av)) {
|
||||||
|
|
||||||
|
/* Count foreign sbrk as system_mem. */
|
||||||
|
if (old_size)
|
||||||
|
av->system_mem += brk - old_end;
|
||||||
|
|
||||||
/* Guarantee alignment of first new chunk made from this space */
|
/* Guarantee alignment of first new chunk made from this space */
|
||||||
|
|
||||||
front_misalign = (INTERNAL_SIZE_T)chunk2mem(brk) & MALLOC_ALIGN_MASK;
|
front_misalign = (INTERNAL_SIZE_T)chunk2mem(brk) & MALLOC_ALIGN_MASK;
|
||||||
@@ -5164,11 +5165,11 @@ int mALLOPt(int param_number, int value)
|
|||||||
int mALLOPt(param_number, value) int param_number; int value;
|
int mALLOPt(param_number, value) int param_number; int value;
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if(__malloc_initialized < 0)
|
|
||||||
ptmalloc_init ();
|
|
||||||
mstate av = &main_arena;
|
mstate av = &main_arena;
|
||||||
int res = 1;
|
int res = 1;
|
||||||
|
|
||||||
|
if(__malloc_initialized < 0)
|
||||||
|
ptmalloc_init ();
|
||||||
(void)mutex_lock(&av->mutex);
|
(void)mutex_lock(&av->mutex);
|
||||||
/* Ensure initialization/consolidation */
|
/* Ensure initialization/consolidation */
|
||||||
malloc_consolidate(av);
|
malloc_consolidate(av);
|
||||||
|
@@ -504,7 +504,7 @@ Instead, use the facilities described in @ref{Time Zone Functions}.
|
|||||||
The @code{gettimeofday} function returns the current calendar time as
|
The @code{gettimeofday} function returns the current calendar time as
|
||||||
the elapsed time since the epoch in the @code{struct timeval} structure
|
the elapsed time since the epoch in the @code{struct timeval} structure
|
||||||
indicated by @var{tp}. (@pxref{Elapsed Time} for a description of
|
indicated by @var{tp}. (@pxref{Elapsed Time} for a description of
|
||||||
@code{struct timespec}). Information about the time zone is returned in
|
@code{struct timeval}). Information about the time zone is returned in
|
||||||
the structure pointed at @var{tzp}. If the @var{tzp} argument is a null
|
the structure pointed at @var{tzp}. If the @var{tzp} argument is a null
|
||||||
pointer, time zone information is ignored.
|
pointer, time zone information is ignored.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user