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
..
2004-08-11 09:40:52 +00:00
2002-09-23 09:36:25 +00:00
2003-11-13 17:53:43 +00:00
2002-09-23 09:36:25 +00:00
2003-07-06 23:24:18 +00:00
2004-04-13 08:36:35 +00:00
2003-07-06 23:43:01 +00:00
2002-09-23 09:36:25 +00:00
2004-04-13 08:36:35 +00:00
2003-07-06 23:43:01 +00:00
2002-09-23 09:36:25 +00:00
2004-04-13 08:36:35 +00:00
2002-09-23 09:36:25 +00:00
2002-09-23 09:36:25 +00:00
2003-11-13 17:35:04 +00:00
2003-07-06 23:43:01 +00:00
2004-01-07 08:47:03 +00:00
2004-01-07 08:47:03 +00:00
2003-09-05 23:29:33 +00:00
2003-09-04 20:57:51 +00:00
2003-09-04 20:57:51 +00:00
2003-09-04 20:57:51 +00:00
2002-09-23 09:36:25 +00:00
2004-04-13 19:08:34 +00:00
2003-07-06 23:43:01 +00:00
2002-10-04 14:16:38 +00:00
2003-11-13 17:35:04 +00:00
2002-10-04 14:16:38 +00:00
2003-07-06 23:43:01 +00:00
2004-01-03 14:18:02 +00:00
2004-04-13 08:36:35 +00:00
2003-07-06 23:43:01 +00:00
2002-09-23 09:36:25 +00:00
2003-11-13 17:53:43 +00:00
2003-07-07 00:23:23 +00:00
2003-07-22 22:03:58 +00:00
2003-04-21 13:24:40 +00:00
2003-04-21 13:24:40 +00:00
2004-06-21 12:42:35 +00:00
2002-09-23 09:36:25 +00:00
2003-11-13 17:53:43 +00:00
2003-07-13 22:35:55 +00:00
2004-08-09 12:21:57 +00:00
2004-08-09 12:21:57 +00:00
2004-08-09 12:21:57 +00:00
2004-02-12 14:34:14 +00:00
2004-04-13 08:36:35 +00:00
2004-02-12 14:34:14 +00:00
2003-07-07 00:32:44 +00:00
2003-11-13 17:53:43 +00:00
2003-07-07 00:23:23 +00:00
2004-01-03 14:18:02 +00:00
2004-01-03 14:18:02 +00:00
2003-05-05 16:18:51 +00:00
2004-03-09 09:59:26 +00:00
2003-04-24 00:40:38 +00:00
2003-05-05 16:18:51 +00:00
2004-03-28 11:26:29 +00:00
2004-03-28 11:26:29 +00:00
2004-03-28 11:26:29 +00:00
2002-09-23 09:36:25 +00:00
2004-04-13 08:36:35 +00:00
2003-12-16 02:05:15 +00:00
2002-09-23 09:36:25 +00:00
2003-12-15 09:00:21 +00:00
2002-09-23 09:36:25 +00:00
2003-07-07 00:23:23 +00:00
2002-09-23 09:36:25 +00:00
2003-11-13 17:35:04 +00:00
2003-07-07 00:23:23 +00:00
2002-09-23 09:36:25 +00:00
2003-11-13 17:53:43 +00:00
2002-09-23 09:36:25 +00:00
2003-07-07 00:23:23 +00:00
2004-03-09 01:44:11 +00:00
2004-03-09 01:44:11 +00:00
2004-03-09 01:44:11 +00:00
2004-03-09 01:44:11 +00:00
2004-03-09 01:44:11 +00:00
2004-03-09 01:44:11 +00:00
2004-03-27 18:02:37 +00:00
2004-03-31 22:47:52 +00:00
2004-03-27 18:02:37 +00:00
2004-03-09 01:44:11 +00:00
2004-03-09 01:44:11 +00:00
2004-03-09 01:44:11 +00:00
2004-03-09 08:50:02 +00:00
2004-07-25 15:18:21 +00:00
2004-03-09 01:44:11 +00:00
2004-03-09 01:44:11 +00:00
2004-07-25 15:18:21 +00:00
2004-03-09 01:44:11 +00:00
2004-03-09 01:44:11 +00:00
2004-07-25 15:18:21 +00:00
2004-03-09 01:44:11 +00:00
2004-08-11 09:40:52 +00:00
2002-09-23 09:36:25 +00:00
2003-11-13 17:53:43 +00:00
2003-07-07 00:23:23 +00:00
2002-09-23 09:36:25 +00:00
2003-11-13 17:53:43 +00:00
2003-07-07 00:23:23 +00:00
2003-04-15 13:03:23 +00:00
2003-07-07 00:23:23 +00:00
2003-04-15 13:03:23 +00:00
2003-07-07 00:23:23 +00:00
2002-09-23 09:36:25 +00:00
2003-11-13 17:35:04 +00:00
2002-09-23 09:36:25 +00:00
2003-07-07 00:43:34 +00:00
2004-01-03 14:18:02 +00:00
2003-11-13 17:35:04 +00:00
2002-09-23 09:36:25 +00:00
2003-07-07 00:43:34 +00:00
2004-01-03 14:18:02 +00:00
2003-11-13 17:35:04 +00:00
2003-07-07 00:43:34 +00:00
2004-08-11 09:40:52 +00:00
2004-08-11 09:40:52 +00:00
2004-08-11 09:40:52 +00:00
2002-09-23 09:36:25 +00:00
2003-11-13 17:53:43 +00:00
2003-07-07 00:43:34 +00:00
2002-09-23 09:36:25 +00:00
2003-11-13 17:35:04 +00:00
2002-09-23 09:36:25 +00:00
2003-07-07 00:43:34 +00:00
2004-06-19 18:12:36 +00:00
2004-06-19 18:12:36 +00:00
2004-06-19 18:12:36 +00:00
2004-01-03 14:18:02 +00:00
2003-11-13 17:35:04 +00:00
2003-07-07 00:03:52 +00:00
2003-07-07 00:03:52 +00:00
2002-09-23 09:36:25 +00:00
2003-11-13 17:53:43 +00:00
2004-03-07 19:40:33 +00:00
2003-09-30 16:52:47 +00:00
2002-09-23 09:36:25 +00:00
2003-07-07 00:43:34 +00:00
2003-07-07 00:43:34 +00:00
2003-12-02 10:17:44 +00:00
2003-07-07 23:56:10 +00:00
2004-01-03 14:18:02 +00:00
2003-12-02 10:17:44 +00:00
2003-12-16 02:05:15 +00:00
2003-07-07 00:43:34 +00:00
2003-10-09 15:40:38 +00:00
2003-10-09 15:40:38 +00:00
2003-10-09 15:40:38 +00:00
2004-04-13 19:11:27 +00:00
2003-06-01 20:04:10 +00:00
2004-04-13 19:11:27 +00:00
2003-02-26 10:16:02 +00:00
2003-05-02 16:19:10 +00:00
2003-07-07 23:56:10 +00:00
2003-07-07 23:56:10 +00:00
2003-11-02 17:43:27 +00:00
2003-11-13 17:35:04 +00:00
2003-04-15 13:03:23 +00:00
2003-07-07 23:56:10 +00:00
2003-10-30 09:11:03 +00:00
2003-10-30 09:11:03 +00:00
2003-10-30 09:11:03 +00:00
2002-09-23 09:36:25 +00:00
2002-09-23 09:36:25 +00:00
2003-11-13 17:35:04 +00:00
2002-09-23 09:36:25 +00:00
2003-07-07 23:56:10 +00:00
2003-07-07 23:56:10 +00:00
2003-07-07 23:56:10 +00:00
2003-07-07 23:56:10 +00:00
2004-01-03 14:18:02 +00:00
2003-07-07 23:56:10 +00:00
2003-07-07 23:56:10 +00:00
2003-07-24 17:39:59 +00:00
2003-11-13 17:53:43 +00:00
2003-07-24 17:39:59 +00:00
2004-01-03 14:18:02 +00:00
2003-12-16 02:05:15 +00:00
2003-07-07 23:56:10 +00:00
2002-09-23 09:36:25 +00:00
2004-04-13 08:36:35 +00:00
2002-09-23 09:36:25 +00:00
2003-07-07 23:56:10 +00:00
2003-07-07 23:56:10 +00:00
2003-07-07 23:56:10 +00:00
2003-11-13 17:35:04 +00:00
2003-07-07 23:56:10 +00:00
2003-07-07 23:56:10 +00:00
2002-10-07 14:46:07 +00:00
2002-09-23 09:36:25 +00:00
2003-11-13 17:53:43 +00:00
2003-07-07 23:56:10 +00:00
2004-01-21 17:40:16 +00:00
2003-12-16 02:05:15 +00:00
2004-01-21 17:40:16 +00:00
2003-07-13 11:13:37 +00:00
2004-07-10 14:56:28 +00:00
2004-07-10 14:56:28 +00:00
2002-09-23 09:36:25 +00:00
2003-12-02 10:17:44 +00:00
2004-04-10 00:53:45 +00:00
2003-07-07 23:56:10 +00:00
2002-10-06 00:08:57 +00:00
2003-11-13 17:35:04 +00:00
2003-07-07 23:56:10 +00:00
2002-09-23 09:36:25 +00:00
2003-12-15 09:00:21 +00:00
2003-07-07 23:56:10 +00:00
2003-07-07 23:56:10 +00:00
2003-09-05 23:02:38 +00:00
2004-04-13 08:36:35 +00:00
2004-03-09 09:16:35 +00:00
2003-09-05 23:02:38 +00:00
2004-08-03 13:29:09 +00:00
2003-12-16 02:05:15 +00:00
2003-12-02 14:56:04 +00:00