aboutsummaryrefslogtreecommitdiff
path: root/malloc/malloc.c
AgeCommit message (Collapse)AuthorFilesLines
2014-01-05Fix race in free() of fastbin chunk: BZ #15073Maxim Kuvyrkov1-8/+12
Perform sanity check only if we have_lock. Due to lockless nature of fastbins we need to be careful derefencing pointers to fastbin entries (chunksize(old) in this case) in multithreaded environments. The fix is to add have_lock to the if-condition checks. The rest of the patch only makes code more readable. * malloc/malloc.c (_int_free): Perform sanity check only if we have_lock. Conflicts: ChangeLog NEWS
2012-10-04Name space hygeine for madvise.Roland McGrath1-1/+1
2012-10-02Clarify memory allocation error diagnostics to avoid confusionDmitry V. Levin1-2/+1
2012-09-07Cleanup code duplication in malloc on fallback to use another arenaSiddhesh Poyarekar1-75/+11
Break the fallback code to try another arena into a separate function for readability.
2012-09-05* malloc/malloc.c (__libc_mallopt) <M_MMAP_MAX>: Fix indentation.Alexandre Oliva1-2/+2
2012-09-05Don't change no_dyn_threshold on mallopt failureAlexandre Oliva1-2/+4
* malloc/malloc.c (__libc_mallopt) <M_MMAP_THRESHOLD>: Do not change internal state upon failure.
2012-09-05Return requested size for malloc_usable_size when MALLOC_CHECK_ > 0Siddhesh Poyarekar1-1/+4
[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-08-17Make malloc build for no-threads configurations.Roland McGrath1-1/+2
2012-08-10Fix whitespace problems detected by commit hooks.Jeff Law1-6/+6
2012-08-10 [BZ #13939]Jeff Law1-21/+32
* 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-05-24Make free chunk size a multiple of MALLOC_ALIGNMENTH.J. Lu1-4/+6
2012-05-24Properly handle MALLOC_ALIGNMENT > 2 * SIZE_SZH.J. Lu1-14/+64
2012-05-21Fix last changeAndreas Jaeger1-0/+2
Include shlib-compat.h for SHLIB_COMPAT.
2012-05-21Set MALLOC_ALIGNMENT to at least __alignof__ (long double) for new ABIs.Roland McGrath1-10/+14
2012-05-16For [BZ #208], accumulate malloc stats over all arenas.Paul Pluzhnikov1-19/+32
2012-03-20Move stdio-common/_itoa.h to sysdeps/genericH.J. Lu1-1/+1
2012-02-09Replace FSF snail mail address with URLs.Paul Eggert1-3/+2
2012-01-31Cleanups of mallocUlrich Drepper1-165/+110
Remove ugly names and unnecessary wrappers.
2012-01-17More minor malloc cleanupsUlrich Drepper1-24/+1
2012-01-16Minor cleanups of malloc codeUlrich Drepper1-52/+0
2012-01-07Remove pre-ISO C supportUlrich Drepper1-9/+9
No more __const.
2012-01-01Implement aligned_allocUlrich Drepper1-0/+2
2011-10-29Avoid assertion in processes with VM in bad shapeUlrich Drepper1-4/+4
2011-09-10Remove MALLOC_FAILURE_ACTION use in mallocUlrich Drepper1-19/+4
2011-09-10Simplify malloc initializationUlrich Drepper1-38/+31
Singificantly reduce the code needed at malloc initialization. In the process getpagesize is simplified by always initializing GLRO(dl_pagesize).
2011-09-10Simplify malloc codeUlrich Drepper1-1447/+203
Remove all kinds of unused configuration options and dead code.
2011-09-10Remove support for !USE___THREADUlrich Drepper1-13/+1
2011-04-22Remove doubled words.Jim Meyering1-2/+2
2010-12-25Use fastbin macro everywhere.Ulrich Drepper1-1/+1
2010-10-24Fix perturbing in malloc on free.Ulrich Drepper1-2/+2
2010-08-16Replace divide and multiply with mask in sYSTRImAnton Blanchard1-1/+1
2010-05-06Fix race in free sanity check.Ulrich Drepper1-6/+9
2010-04-14Remove unintended change.Ulrich Drepper1-4/+0
2010-04-14Optimie x86-64 SSE4 memcmp for unaligned data.H.J. Lu1-0/+4
2010-04-08Fix possibly uninitilized variable handling.Ulrich Drepper1-0/+1
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-03One more sanity check in free.Ulrich Drepper1-1/+14
2010-04-03Fix set_max_fast in malloc.Ulrich Drepper1-1/+2
2010-03-26Remove stale reference to websiteUlrich Drepper1-2/+1
2010-03-26Remove unwanted malloc changes, again.Ulrich Drepper1-14/+1
2010-03-25Merge branch 'master' of ssh://sources.redhat.com/git/glibcUlrich Drepper1-1/+14
Conflicts: ChangeLog
2010-02-24Fix typos I added in malloc.cUlrich Drepper1-2/+2
2010-02-24Fix assertion in palloc and pvalloc as well.Petr Baudis1-7/+9
2010-02-10Undo unintended maloc change.Ulrich Drepper1-15/+2
2010-02-09Avoid PLT call to fegetenv on s390Andreas Schwab1-2/+15
2010-01-14Fix malloc_info without prioor allocations.Ulrich Drepper1-17/+24
2009-10-29Fix typos in format strings of malloc_info.John Sullivan1-2/+2
2009-08-31Add local assert function to avoid problems with memory allocation inUlrich Drepper1-439/+461
the real one.
2009-07-16Fix race in corruption check.Ulrich Drepper1-2/+23
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-16Use rel semantics of cas instead of acq semantics with full barrier before ↵Jakub Jelinek1-2/+1
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-02Fix possible race when freeing object in fast bin list.Ulrich Drepper1-0/+1