Roland McGrath
9043e2288e
Name space hygeine for madvise.
2012-10-04 16:31:43 -07:00
Dmitry V. Levin
bb9510dc34
Clarify memory allocation error diagnostics to avoid confusion
2012-10-02 16:09:30 +00:00
Siddhesh Poyarekar
c78ab09473
Cleanup code duplication in malloc on fallback to use another arena
...
Break the fallback code to try another arena into a separate function
for readability.
2012-09-07 14:40:58 +05:30
Alexandre Oliva
61d5817416
* malloc/malloc.c (__libc_mallopt) <M_MMAP_MAX>: Fix indentation.
2012-09-05 20:37:37 -03:00
Alexandre Oliva
5c44738353
Don't change no_dyn_threshold on mallopt failure
...
* malloc/malloc.c (__libc_mallopt) <M_MMAP_THRESHOLD>: Do not
change internal state upon failure.
2012-09-05 15:43:04 -03:00
Siddhesh Poyarekar
6ef9cc37f0
Return requested size for malloc_usable_size when MALLOC_CHECK_ > 0
...
[BZ #1349 ]
malloc_usable_size returns the usable size in an allocated chunk,
which may be >= the requested size. In the case of MALLOC_CHECK_ being
exported to > 0 however, only the requested size is usable, since a
magic value is written at the end of the request size to trap writes
beyond request bounds. Hence, when MALLOC_CHECK_ is exported to > 0,
malloc_usable_size() should return the request size.
2012-09-05 21:49:30 +05:30
Roland McGrath
750c1f2a9a
Make malloc build for no-threads configurations.
2012-08-17 11:29:45 -07:00
Jeff Law
77480c6ba5
Fix whitespace problems detected by commit hooks.
2012-08-10 09:39:58 -06:00
Jeff Law
bf51f568f1
[BZ #13939 ]
...
* malloc.c/arena.c (reused_arena): New parameter, avoid_arena.
When avoid_arena is set, don't retry in the that arena. Pick the
next one, whatever it might be.
(arena_get2): New parameter avoid_arena, pass through to reused_arena.
(arena_lock): Pass in new parameter to arena_get2.
* malloc/malloc.c (__libc_memalign): Pass in new parameter to
arena_get2.
(__libc_malloc): Unify retrying after main arena failure with
__libc_memalign version.
(__libc_valloc, __libc_pvalloc, __libc_calloc): Likewise.
2012-08-10 09:37:52 -06:00
H.J. Lu
347c92e9e7
Make free chunk size a multiple of MALLOC_ALIGNMENT
2012-05-24 17:50:28 -07:00
H.J. Lu
b5a2bbe6cc
Properly handle MALLOC_ALIGNMENT > 2 * SIZE_SZ
2012-05-24 11:57:23 -07:00
Andreas Jaeger
662742187c
Fix last change
...
Include shlib-compat.h for SHLIB_COMPAT.
2012-05-21 21:02:33 +02:00
Roland McGrath
cbc00a0398
Set MALLOC_ALIGNMENT to at least __alignof__ (long double) for new ABIs.
2012-05-21 11:13:10 -07:00
Paul Pluzhnikov
bedee953d8
For [BZ #208 ], accumulate malloc stats over all arenas.
2012-05-16 16:46:10 -07:00
H.J. Lu
eb96ffb07d
Move stdio-common/_itoa.h to sysdeps/generic
2012-03-20 16:00:23 -07:00
Paul Eggert
59ba27a63a
Replace FSF snail mail address with URLs.
2012-02-09 23:18:22 +00:00
Ulrich Drepper
3b49edc04b
Cleanups of malloc
...
Remove ugly names and unnecessary wrappers.
2012-01-31 18:49:22 -05:00
Ulrich Drepper
6e4b210745
More minor malloc cleanups
2012-01-17 19:21:09 -05:00
Ulrich Drepper
d77e786926
Minor cleanups of malloc code
2012-01-16 12:07:56 -05:00
Ulrich Drepper
a784e50247
Remove pre-ISO C support
...
No more __const.
2012-01-07 23:57:22 -05:00
Ulrich Drepper
380d7e87dc
Implement aligned_alloc
2012-01-01 07:17:21 -05:00
Ulrich Drepper
6ef76f3b51
Avoid assertion in processes with VM in bad shape
2011-10-29 16:39:03 -04:00
Ulrich Drepper
8e58439c92
Remove MALLOC_FAILURE_ACTION use in malloc
2011-09-10 22:12:38 -04:00
Ulrich Drepper
02d46fc4b9
Simplify malloc initialization
...
Singificantly reduce the code needed at malloc initialization. In
the process getpagesize is simplified by always initializing
GLRO(dl_pagesize).
2011-09-10 21:47:36 -04:00
Ulrich Drepper
22a8918713
Simplify malloc code
...
Remove all kinds of unused configuration options and dead code.
2011-09-10 18:10:17 -04:00
Ulrich Drepper
d063d16433
Remove support for !USE___THREAD
2011-09-10 16:50:28 -04:00
Jim Meyering
ded5b9b7c7
Remove doubled words.
2011-04-22 21:34:32 -04:00
Ulrich Drepper
9798346413
Use fastbin macro everywhere.
2010-12-25 14:15:42 -05:00
Ulrich Drepper
fdc0f374bc
Fix perturbing in malloc on free.
2010-10-24 22:37:00 -04:00
Anton Blanchard
b9b42ee01c
Replace divide and multiply with mask in sYSTRIm
2010-08-16 23:06:55 -07:00
Ulrich Drepper
5f24d53acb
Fix race in free sanity check.
2010-05-06 04:42:46 -07:00
Ulrich Drepper
2645b8e5cc
Remove unintended change.
2010-04-14 21:09:21 -07:00
H.J. Lu
dd37cd1a12
Optimie x86-64 SSE4 memcmp for unaligned data.
2010-04-14 17:53:44 -07:00
Ulrich Drepper
ad3d3e8f20
Fix possibly uninitilized variable handling.
...
If malloc errors are ignored (which say aren't by default and never
should be) malloc in the old, slow form might use an uninitialized
variable.
2010-04-08 17:12:42 -07:00
Ulrich Drepper
90a3055e8b
One more sanity check in free.
2010-04-03 09:47:01 -07:00
Ulrich Drepper
991eda1ec1
Fix set_max_fast in malloc.
2010-04-03 09:43:10 -07:00
Ulrich Drepper
2b0fba7530
Remove stale reference to website
2010-03-26 05:09:55 -07:00
Ulrich Drepper
3e259dbb32
Remove unwanted malloc changes, again.
2010-03-26 04:00:10 -07:00
Ulrich Drepper
70c90289ff
Merge branch 'master' of ssh://sources.redhat.com/git/glibc
...
Conflicts:
ChangeLog
2010-03-25 19:45:20 -07:00
Ulrich Drepper
9d2569846c
Fix typos I added in malloc.c
2010-02-24 19:47:09 -08:00
Petr Baudis
8c0b5f148e
Fix assertion in palloc and pvalloc as well.
2010-02-24 15:44:29 -08:00
Ulrich Drepper
2c2243f708
Undo unintended maloc change.
2010-02-10 00:04:49 -08:00
Andreas Schwab
7eb22e757e
Avoid PLT call to fegetenv on s390
2010-02-09 22:34:17 -08:00
Ulrich Drepper
346bc35c33
Fix malloc_info without prioor allocations.
2010-01-14 13:32:58 -08:00
John Sullivan
ee6f35389c
Fix typos in format strings of malloc_info.
2009-10-29 21:50:35 -07:00
Ulrich Drepper
72f9026327
Add local assert function to avoid problems with memory allocation in
...
the real one.
2009-08-31 04:55:10 -07:00
Ulrich Drepper
bec466d922
Fix race in corruption check.
...
With atomic fastbins the checks performed can race with concurrent
modifications of the arena. If we detect a problem re-do the test
after getting the lock.
2009-07-16 09:54:34 -07:00
Jakub Jelinek
bea0ac1d87
Use rel semantics of cas instead of acq semantics with full barrier before it in _int_free
...
The following patch fixes catomic_compare_and_exchange_*_rel definitions
(which were never used and weren't correct) and uses
catomic_compare_and_exchange_val_rel in _int_free. Comparing to the
pre-2009-07-02 --enable-experimental-malloc state the generated code should
be identical on all arches other than ppc/ppc64 and on ppc/ppc64 should use
lwsync instead of isync barrier.
2009-07-16 07:24:50 -07:00
Ulrich Drepper
6cbbaa50aa
Fix possible race when freeing object in fast bin list.
2009-07-02 03:30:55 -07:00
Ulrich Drepper
f6887a0d9a
Add some more tests to malloc to detect corruptions.
2009-06-18 22:37:31 -07:00