]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
List memalign as an allocator.
authorJeremy Fitzhardinge <jeremy@valgrind.org>
Thu, 4 Mar 2004 22:42:03 +0000 (22:42 +0000)
committerJeremy Fitzhardinge <jeremy@valgrind.org>
Thu, 4 Mar 2004 22:42:03 +0000 (22:42 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2287

massif/ms_main.c

index b8d96f32376bd494adeb4ede8ff88d0aea0de1a4..8eca14d84a0799fc513522e97d1d3551fe10acd1 100644 (file)
@@ -254,7 +254,7 @@ static UInt n_heap_blocks = 0;
 #define MAX_ALLOC_FNS      32      // includes the builtin ones
 
 // First six filled in, rest should be zeroed.  argc/argv-style vector.
-static UInt  n_alloc_fns = 8;
+static UInt  n_alloc_fns = 9;
 static Char* alloc_fns[MAX_ALLOC_FNS] = { 
    "malloc",
    "operator new(unsigned)",
@@ -264,6 +264,7 @@ static Char* alloc_fns[MAX_ALLOC_FNS] = {
    "calloc",
    "realloc",
    "my_malloc",   // from vg_libpthread.c
+   "memalign",
 };
 
 
@@ -780,6 +781,11 @@ void* SK_(calloc) ( Int m, Int size )
    return new_block( m*size, VG_(clo_alignment), /*is_zeroed*/True );
 }
 
+void *SK_(memalign)( Int align, Int n )
+{
+   return new_block( n, align, False );
+}
+
 void SK_(free) ( void* p )
 {
    die_block( p, /*custom_free*/False );