about summary refs log tree commit diff
path: root/malloc
Commit message (Collapse)AuthorAgeFilesLines
...
* Add malloc probes for sbrk and heap resizing.Alexandre Oliva2013-09-202-1/+9
| | | | | | | | | | | | for ChangeLog * malloc/arena.c (new_heap): New memory_heap_new probe. (grow_heap): New memory_heap_more probe. (shrink_heap): New memory_heap_less probe. (heap_trim): New memory_heap_free probe. * malloc/malloc.c (sysmalloc): New memory_sbrk_more probe. (systrim): New memory_sbrk_less probe. * manual/probes.texi: Document them.
* Add catch-all alloc retry probe.Alexandre Oliva2013-09-201-0/+1
| | | | | | | for ChangeLog * malloc/arena.c (arena_get_retry): Add memory_arena_retry probe. * manual/probes.texi: Document it.
* Add probes for malloc retries.Alexandre Oliva2013-09-201-0/+6
| | | | | | | | | | | | for ChangeLog * malloc/malloc.c (__libc_malloc): Add memory_malloc_retry probe. (__libc_realloc): Add memory_realloc_retry probe. (__libc_memalign): Add memory_memalign_retry probe. (__libc_valloc): Add memory_valloc_retry probe. (__libc_pvalloc): Add memory_pvalloc_retry probe. (__libc_calloc): Add memory_calloc_retry probe. * manual/probes.texi: Document them.
* Add probes for malloc arena changes.Alexandre Oliva2013-09-202-0/+6
| | | | | | | | | | | | | for ChangeLog * malloc/arena.c (get_free_list): Add probe memory_arena_reuse_free_list. (reused_arena) [PER_THREAD]: Add probes memory_arena_reuse_wait and memory_arena_reuse. (arena_get2) [!PER_THREAD]: Likewise. * malloc/malloc.c (__libc_realloc) [!PER_THREAD]: Add probe memory_arena_reuse_realloc. * manual/probes.texi: Document them.
* Add probes for all changes to malloc options.Alexandre Oliva2013-09-201-5/+25
| | | | | | | | | for ChangeLog * malloc/malloc.c (__libc_free): Add memory_mallopt_free_dyn_thresholds probe. (__libc_mallopt): Add multiple memory_mallopt probes. * manual/probes.texi: Document them.
* Add first set of memory probes.Alexandre Oliva2013-09-202-0/+5
| | | | | | | | | | | for ChangeLog * malloc/malloc.c: Include stap-probe.h. (__libc_mallopt): Add memory_mallopt probe. * malloc/arena.c (_int_new_arena): Add memory_arena_new probe. * manual/probes.texi: New. * manual/Makefile (chapters): Add probes. * manual/threads.texi: Set next node.
* malloc: Check for integer overflow in memalign.Will Newton2013-09-111-0/+7
| | | | | | | | | | | | | | A large bytes parameter to memalign could cause an integer overflow and corrupt allocator internals. Check the overflow does not occur before continuing with the allocation. ChangeLog: 2013-09-11 Will Newton <will.newton@linaro.org> [BZ #15857] * malloc/malloc.c (__libc_memalign): Check the value of bytes does not overflow.
* malloc: Check for integer overflow in valloc.Will Newton2013-09-111-0/+7
| | | | | | | | | | | | | | A large bytes parameter to valloc could cause an integer overflow and corrupt allocator internals. Check the overflow does not occur before continuing with the allocation. ChangeLog: 2013-09-11 Will Newton <will.newton@linaro.org> [BZ #15856] * malloc/malloc.c (__libc_valloc): Check the value of bytes does not overflow.
* malloc: Check for integer overflow in pvalloc.Will Newton2013-09-111-0/+7
| | | | | | | | | | | | | | A large bytes parameter to pvalloc could cause an integer overflow and corrupt allocator internals. Check the overflow does not occur before continuing with the allocation. ChangeLog: 2013-09-11 Will Newton <will.newton@linaro.org> [BZ #15855] * malloc/malloc.c (__libc_pvalloc): Check the value of bytes does not overflow.
* malloc: Add realloc test.Will Newton2013-09-092-1/+148
| | | | | | | | | | | | | The current tests don't test the functionality of realloc in detail. Add a new test for realloc that exercises some of the corner cases that are not otherwise tested. ChangeLog: 2013-09-09 Will Newton <will.newton@linaro.org> * malloc/Makefile: Add tst-realloc to tests. * malloc/tst-realloc.c: New file.
* Fix typos.Ondřej Bílka2013-08-291-1/+1
|
* Use (void) in no-arguments function definitions.Joseph Myers2013-06-083-5/+5
|
* Avoid use of "register" as optimization hint.Joseph Myers2013-06-071-13/+13
|
* Link extra-libs consistently with libc and ld.so.Joseph Myers2013-05-311-1/+1
|
* Add #include <stdint.h> for uint[32|64]_t usage (except installed headers).Ryan S. Arnold2013-05-162-0/+2
|
* Move _obstack_compat out of commonPeter Collingbourne2013-05-151-1/+1
| | | | | | | | | | | | | it is impossible to create an alias of a common symbol (as compat_symbol does), because common symbols do not have a section or an offset until linked. GNU as tolerates aliases of common symbols by simply creating another common symbol, but other assemblers (notably LLVM's integrated assembler) are less tolerant. 2013-05-15 Peter Collingbourne <pcc@google.com> * malloc/obstack.c (_obstack_compat): Add initializer. -
* BZ#14812: Add missing translation marker on some argp option argument names ↵Roland McGrath2013-03-181-4/+7
| | | | in utilities.
* Remove __malloc_ptr_t.Joseph Myers2013-03-085-36/+33
|
* Use ISO C prototype for __default_morecore.Joseph Myers2013-03-081-2/+1
|
* Remove __malloc_ptrdiff_t.Joseph Myers2013-03-082-4/+1
|
* Remove __malloc_size_t.Joseph Myers2013-03-083-23/+20
|
* Fix FPE in memusagestat when malloc utilization is zeroSiddhesh Poyarekar2013-02-261-37/+60
| | | | | | | [BZ #15160] Draw graphs for heap and stack only if MAXSIZE_HEAP and MAXSIZE_STACK are non-zero.
* Add HAVE_MREMAP for mremap usagePino Toscano2013-01-172-11/+4
| | | | | | | | | Introduce (only on Linux) and use a HAVE_MREMAP symbol to advertize mremap availability. Move the malloc-sysdep.h include from arena.c to malloc.c, since what is provided by malloc-sysdep.h is needed earlier in malloc.c, before the inclusion of arena.c.
* Add --enable-hardcoded-path-in-tests configure optionH.J. Lu2013-01-112-3/+3
|
* Clean up __MALLOC_* macros.Joseph Myers2013-01-072-36/+16
|
* mtrace: properly handle realloc (p, 0)Andreas Schwab2013-01-031-2/+7
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-0224-26/+24
|
* Add script to update copyright notices and reformat some to facilitate its use.Joseph Myers2013-01-011-2/+1
|
* Update copyright years.David S. Miller2013-01-013-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | * catgets/gencat.c: Update copyright year. * csu/version.c: Likewise. * debug/catchsegv.sh: Likewise. * debug/pcprofiledump.c: Likewise. * debug/xtrace.sh: Likewise. * elf/ldconfig.c: Likewise. * elf/ldd.bash.in: Likewise. * elf/pldd.c: Likewise. * elf/sotruss.ksh: Likewise. * elf/sprof.c: Likewise. * iconv/iconv_prog.c: Likewise. * iconv/iconvconfig.c: Likewise. * locale/programs/locale.c: Likewise. * locale/programs/localedef.c: Likewise. * login/programs/pt_chown.c: Likewise. * malloc/memusage.sh: Likewise. * malloc/memusagestat.c: Likewise. * malloc/mtrace.pl: Likewise. * nscd/nscd.c: Likewise. * nss/getent.c: Likewise. * nss/makedb.c: Likewise. * posix/getconf.c: Likewise.
* muntrace: reset file and hooks before finalizing the streamPino Toscano2012-11-191-2/+7
| | | | | | | | | | fclose will call free, invoking its hook, then fprintf which would indirectly try to allocate a buffer, and this can cause malloc to be used (thus its hook to be invoked) if libio uses malloc instead of mmap; given any malloc/free hook locks the internal lock, this leads to a deadlock. To prevent this hook roundtrip at muntrace, first unset MALLSTREAM and the hooks, and only after that close the trace file.
* Update --version copyright dates for memusagestat and pcprofiledump.Joseph Myers2012-11-151-3/+2
|
* Support --with-pkgversion and --with-bugurl.Joseph Myers2012-11-094-18/+19
|
* Define and use $(run-built-tests).Joseph Myers2012-10-241-1/+1
|
* Use $(run-program-prefix) in more shell script tests.Joseph Myers2012-10-192-2/+3
|
* Name space hygeine for madvise.Roland McGrath2012-10-042-2/+2
|
* Clarify memory allocation error diagnostics to avoid confusionDmitry V. Levin2012-10-021-2/+1
|
* Shrink heap on linux when overcommit_memory == 2Siddhesh Poyarekar2012-09-251-3/+6
| | | | | | | | | | | | | Using madvise with MADV_DONTNEED to release memory back to the kernel is not sufficient to change the commit charge accounted against the process on Linux. It is OK however, when overcommit is enabled or is heuristic. However, when overcommit is restricted to a percentage of memory setting the contents of /proc/sys/vm/overcommit_memory as 2, it makes a difference since memory requests will fail. Hence, we do what we do with secure exec binaries, which is to call mmap on the region to be dropped with MAP_FIXED. This internally unmaps the pages in question and reduces the amount of memory accounted against the process.
* Set "fail on error" mode directly in testsuite shell scriptsDmitry V. Levin2012-09-252-3/+4
|
* Properly handle fencepost with MALLOC_ALIGN_MASKH.J. Lu2012-09-241-3/+7
|
* Cleanup code duplication in malloc on fallback to use another arenaSiddhesh Poyarekar2012-09-072-75/+32
| | | | | Break the fallback code to try another arena into a separate function for readability.
* * malloc/arena.c: Fold copyright years.Alexandre Oliva2012-09-053-5/+3
| | | | * malloc/mcheck.c, malloc/memusage.c: Likewise.
* * malloc/malloc.c (__libc_mallopt) <M_MMAP_MAX>: Fix indentation.Alexandre Oliva2012-09-051-2/+2
|
* Don't change no_dyn_threshold on mallopt failureAlexandre Oliva2012-09-051-2/+4
| | | | | * malloc/malloc.c (__libc_mallopt) <M_MMAP_THRESHOLD>: Do not change internal state upon failure.
* Fix typos in malloc/.Alexandre Oliva2012-09-052-4/+4
| | | | | | * malloc/mcheck.c (mcheck_check_all): Fix typo. * malloc/memusage.c (mmap): Likewise. (mmap64, mremap): Likewise. Adjust name in comment.
* Return requested size for malloc_usable_size when MALLOC_CHECK_ > 0Siddhesh Poyarekar2012-09-054-5/+86
| | | | | | | | | | | [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.
* Make malloc build for no-threads configurations.Roland McGrath2012-08-172-5/+10
|
* Fix whitespace problems detected by commit hooks.Jeff Law2012-08-102-7/+7
|
* [BZ #13939]Jeff Law2012-08-102-27/+45
| | | | | | | | | | | | | * 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.
* Rename __secure_getenv to secure_getenvFlorian Weimer2012-07-251-1/+1
|
* Make free chunk size a multiple of MALLOC_ALIGNMENTH.J. Lu2012-05-241-4/+6
|