14 Commits

Author SHA1 Message Date
Philippe Waroquiers
d9204e9eed Fix 393099 - posix_memalign() invalid write if alignment == 0
Bug and analysis by Gabriel Ganne
2018-04-15 08:06:43 +02:00
Ivo Raisr
d8f648486e Fix some spelling mistakes.
Fixes BZ#374719
Patch by: klemens <ka7@la-evento.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16336
2017-05-05 22:13:20 +00:00
Philippe Waroquiers
3ad6cb5039 Fix order of % versus * in memalign2.c new checks introduced in 12642
(spotted by Florian eagle eyes)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12643
2012-06-15 22:57:40 +00:00
Philippe Waroquiers
e46d2abe7e Fix 203877 and 301229 increase to 16Mb maximum allowed alignment for memalign() and posix_memalign
Note that VG_(arena_memalign) is not used by core or tools for the moment.
We have one single maxima for both the V core/tools and the client.
Enhanced memcheck/tests/memalign2.c to test 4 Mb and 16 Mb alignments.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12642
2012-06-15 22:19:59 +00:00
Julian Seward
c0bb2b82c6 Avoid excessive fragmentation in m_mallocfree by munmapping unused
superblocks in some circumstances (second attempt).  Bug 250101
comment 15.  (Philippe Waroquiers, philippe.waroquiers@skynet.be).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12022
2011-09-10 10:17:35 +00:00
Julian Seward
ad7de5b336 Delete the AIX5 port. The last release this worked for is 3.4.1,
and then only on AIX 5.2 and 5.3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11842
2011-06-28 07:25:29 +00:00
Nicholas Nethercote
07045477ca Merge the DARWIN branch onto the trunk.
I tried using 'svn merge' to do the merge but it did a terrible job and
there were bazillions of conflicts.  So instead I just took the diff between
the branch and trunk  at r10155, applied the diff to the trunk, 'svn add'ed
the added files (no files needed to be 'svn remove'd) and committed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156
2009-05-28 01:53:07 +00:00
Nicholas Nethercote
62444884d4 Merge r9761 (fix a comment) from the trunk.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9763
2009-05-04 06:46:31 +00:00
Nicholas Nethercote
f3f801ed48 Merge r9533..9536 (add tests/{asm.h,sys_mman.h,malloc.h} from the DARWIN
branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9537
2009-04-15 03:12:43 +00:00
Nicholas Nethercote
9850e78e48 Make this pass on AIX (untested).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9281
2009-02-26 22:09:53 +00:00
Nicholas Nethercote
94ed569cdc Fix some more 'make check' warnings, ones that appear on non-Linux
platforms.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9238
2009-02-23 07:17:08 +00:00
Julian Seward
a48daec904 Merge r6109:
Various minor changes to make these compile on AIX5.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6254
2006-10-17 01:26:12 +00:00
Nicholas Nethercote
eea34ddbd6 Avoid spurious warning about using posix_memalign()
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2657
2004-09-03 14:04:40 +00:00
Nicholas Nethercote
9033020ae4 Big overhaul of the allocator. Much of the structure is the same, but
lots of the details changed.  Made the following generalisations:

- Recast everything to be entirely terms of bytes, instead of a mixture
  of (32-bit) words and bytes.  This is a bit easier to understand, and
  made the following generalisations possible...

- Almost 64-bit clean;  no longer assuming 32-bit words/pointers.  Only
  (I think) non-64-bit clean part is that VG_(malloc)() et al take an
  Int as the size arg, and size_t is 64-bits on 64-bit machines.

- Made the alignment of blocks returned by malloc() et al completely
  controlled by a single value, VG_MIN_MALLOC_SZB.  (Previously there
  were various magic numbers and assumptions about block alignment
  scattered throughout.) I tested this, all the regression tests pass
  with VG_MIN_MALLOC_SZB of 4, 8, 16, 32, 64.  One thing required for
  this was to make redzones elastic;  the asked-for redzone size is now
  the minimum size;  it will use bigger ones if necessary to get the
  required alignment.

Some other specific changes:

- Made use of types a bit more;  ie. actually using the type 'Block',
  rather than just having everything as arrays of words, so that should
  be a bit safer.

- Removed the a->rz_check field, which was redundant wrt. a->clientmem.

- Fixed up the decision about which list to use so the 4 lists which
  weren't ever being used now are -- the problem was that this hasn't
  been properly updated when alignment changed from 4 to 8 bytes.

- Added a regression test for memalign() and posix_memalign().
  memalign() was aborting if passed a bad alignment argument.

- Added some high-level comments in various places, explaining how the
  damn thing works.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2579
2004-08-11 09:40:52 +00:00