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
61d5817416
* malloc/malloc.c (__libc_mallopt) <M_MMAP_MAX>: Fix indentation.
2012-09-05 20:37:37 -03:00
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
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
750c1f2a9a
Make malloc build for no-threads configurations.
2012-08-17 11:29:45 -07:00
77480c6ba5
Fix whitespace problems detected by commit hooks.
2012-08-10 09:39:58 -06:00
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
347c92e9e7
Make free chunk size a multiple of MALLOC_ALIGNMENT
2012-05-24 17:50:28 -07:00
b5a2bbe6cc
Properly handle MALLOC_ALIGNMENT > 2 * SIZE_SZ
2012-05-24 11:57:23 -07:00
662742187c
Fix last change
...
Include shlib-compat.h for SHLIB_COMPAT.
2012-05-21 21:02:33 +02:00
cbc00a0398
Set MALLOC_ALIGNMENT to at least __alignof__ (long double) for new ABIs.
2012-05-21 11:13:10 -07:00
bedee953d8
For [BZ #208 ], accumulate malloc stats over all arenas.
2012-05-16 16:46:10 -07:00
eb96ffb07d
Move stdio-common/_itoa.h to sysdeps/generic
2012-03-20 16:00:23 -07:00
59ba27a63a
Replace FSF snail mail address with URLs.
2012-02-09 23:18:22 +00:00
3b49edc04b
Cleanups of malloc
...
Remove ugly names and unnecessary wrappers.
2012-01-31 18:49:22 -05:00
6e4b210745
More minor malloc cleanups
2012-01-17 19:21:09 -05:00
d77e786926
Minor cleanups of malloc code
2012-01-16 12:07:56 -05:00
a784e50247
Remove pre-ISO C support
...
No more __const.
2012-01-07 23:57:22 -05:00
380d7e87dc
Implement aligned_alloc
2012-01-01 07:17:21 -05:00
6ef76f3b51
Avoid assertion in processes with VM in bad shape
2011-10-29 16:39:03 -04:00
8e58439c92
Remove MALLOC_FAILURE_ACTION use in malloc
2011-09-10 22:12:38 -04:00
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
22a8918713
Simplify malloc code
...
Remove all kinds of unused configuration options and dead code.
2011-09-10 18:10:17 -04:00
d063d16433
Remove support for !USE___THREAD
2011-09-10 16:50:28 -04:00
ded5b9b7c7
Remove doubled words.
2011-04-22 21:34:32 -04:00
9798346413
Use fastbin macro everywhere.
2010-12-25 14:15:42 -05:00
fdc0f374bc
Fix perturbing in malloc on free.
2010-10-24 22:37:00 -04:00
b9b42ee01c
Replace divide and multiply with mask in sYSTRIm
2010-08-16 23:06:55 -07:00
5f24d53acb
Fix race in free sanity check.
2010-05-06 04:42:46 -07:00
2645b8e5cc
Remove unintended change.
2010-04-14 21:09:21 -07:00
dd37cd1a12
Optimie x86-64 SSE4 memcmp for unaligned data.
2010-04-14 17:53:44 -07:00
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
90a3055e8b
One more sanity check in free.
2010-04-03 09:47:01 -07:00
991eda1ec1
Fix set_max_fast in malloc.
2010-04-03 09:43:10 -07:00
2b0fba7530
Remove stale reference to website
2010-03-26 05:09:55 -07:00
3e259dbb32
Remove unwanted malloc changes, again.
2010-03-26 04:00:10 -07:00
70c90289ff
Merge branch 'master' of ssh://sources.redhat.com/git/glibc
...
Conflicts:
ChangeLog
2010-03-25 19:45:20 -07:00
9d2569846c
Fix typos I added in malloc.c
2010-02-24 19:47:09 -08:00
8c0b5f148e
Fix assertion in palloc and pvalloc as well.
2010-02-24 15:44:29 -08:00
2c2243f708
Undo unintended maloc change.
2010-02-10 00:04:49 -08:00
7eb22e757e
Avoid PLT call to fegetenv on s390
2010-02-09 22:34:17 -08:00
346bc35c33
Fix malloc_info without prioor allocations.
2010-01-14 13:32:58 -08:00
ee6f35389c
Fix typos in format strings of malloc_info.
2009-10-29 21:50:35 -07:00
72f9026327
Add local assert function to avoid problems with memory allocation in
...
the real one.
2009-08-31 04:55:10 -07:00
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
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
6cbbaa50aa
Fix possible race when freeing object in fast bin list.
2009-07-02 03:30:55 -07:00
f6887a0d9a
Add some more tests to malloc to detect corruptions.
2009-06-18 22:37:31 -07:00
0588a9cb62
* malloc/malloc.c (malloc_info): Output address space information.
2009-04-18 08:44:10 +00:00
da2d2fb68d
* malloc/malloc.c (malloc_info): Also output system memory information.
2009-04-18 05:14:52 +00:00