iPXE
Defines | Enumerations | Functions
memcheck.h File Reference
#include "valgrind.h"

Go to the source code of this file.

Defines

#define VALGRIND_MAKE_MEM_NOACCESS(_qzz_addr, _qzz_len)
#define VALGRIND_MAKE_MEM_UNDEFINED(_qzz_addr, _qzz_len)
#define VALGRIND_MAKE_MEM_DEFINED(_qzz_addr, _qzz_len)
#define VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE(_qzz_addr, _qzz_len)
#define VALGRIND_CREATE_BLOCK(_qzz_addr, _qzz_len, _qzz_desc)
#define VALGRIND_DISCARD(_qzz_blkindex)
#define VALGRIND_CHECK_MEM_IS_ADDRESSABLE(_qzz_addr, _qzz_len)
#define VALGRIND_CHECK_MEM_IS_DEFINED(_qzz_addr, _qzz_len)
#define VALGRIND_CHECK_VALUE_IS_DEFINED(__lvalue)
#define VALGRIND_DO_LEAK_CHECK
#define VALGRIND_DO_QUICK_LEAK_CHECK
#define VALGRIND_COUNT_LEAKS(leaked, dubious, reachable, suppressed)
#define VALGRIND_COUNT_LEAK_BLOCKS(leaked, dubious, reachable, suppressed)
#define VALGRIND_GET_VBITS(zza, zzvbits, zznbytes)
#define VALGRIND_SET_VBITS(zza, zzvbits, zznbytes)

Enumerations

enum  Vg_MemCheckClientRequest {
  VG_USERREQ__MAKE_MEM_NOACCESS = VG_USERREQ_TOOL_BASE('M','C'), VG_USERREQ__MAKE_MEM_UNDEFINED, VG_USERREQ__MAKE_MEM_DEFINED, VG_USERREQ__DISCARD,
  VG_USERREQ__CHECK_MEM_IS_ADDRESSABLE, VG_USERREQ__CHECK_MEM_IS_DEFINED, VG_USERREQ__DO_LEAK_CHECK, VG_USERREQ__COUNT_LEAKS,
  VG_USERREQ__GET_VBITS, VG_USERREQ__SET_VBITS, VG_USERREQ__CREATE_BLOCK, VG_USERREQ__MAKE_MEM_DEFINED_IF_ADDRESSABLE,
  VG_USERREQ__COUNT_LEAK_BLOCKS, _VG_USERREQ__MEMCHECK_RECORD_OVERLAP_ERROR = VG_USERREQ_TOOL_BASE('M','C') + 256
}

Functions

 FILE_LICENCE (BSD3)

Define Documentation

#define VALGRIND_MAKE_MEM_NOACCESS (   _qzz_addr,
  _qzz_len 
)
Value:
(__extension__({unsigned long _qzz_res;                       \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0 /* default return */, \
                            VG_USERREQ__MAKE_MEM_NOACCESS,       \
                            _qzz_addr, _qzz_len, 0, 0, 0);       \
    _qzz_res;                                                    \
   }))

Definition at line 111 of file memcheck.h.

Referenced by alloc_memblock(), free_memblock(), init_heap(), realloc(), and valgrind_make_blocks_noaccess().

#define VALGRIND_MAKE_MEM_UNDEFINED (   _qzz_addr,
  _qzz_len 
)
Value:
(__extension__({unsigned long _qzz_res;                       \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0 /* default return */, \
                            VG_USERREQ__MAKE_MEM_UNDEFINED,      \
                            _qzz_addr, _qzz_len, 0, 0, 0);       \
    _qzz_res;                                                    \
   }))

Definition at line 121 of file memcheck.h.

Referenced by alloc_memblock(), and free_memblock().

#define VALGRIND_MAKE_MEM_DEFINED (   _qzz_addr,
  _qzz_len 
)
Value:
(__extension__({unsigned long _qzz_res;                       \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0 /* default return */, \
                            VG_USERREQ__MAKE_MEM_DEFINED,        \
                            _qzz_addr, _qzz_len, 0, 0, 0);       \
    _qzz_res;                                                    \
   }))

Definition at line 131 of file memcheck.h.

Referenced by realloc(), valgrind_make_blocks_defined(), and valgrind_make_blocks_noaccess().

#define VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE (   _qzz_addr,
  _qzz_len 
)
Value:
(__extension__({unsigned long _qzz_res;                       \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0 /* default return */, \
                            VG_USERREQ__MAKE_MEM_DEFINED_IF_ADDRESSABLE, \
                            _qzz_addr, _qzz_len, 0, 0, 0);       \
    _qzz_res;                                                    \
   }))

Definition at line 142 of file memcheck.h.

#define VALGRIND_CREATE_BLOCK (   _qzz_addr,
  _qzz_len,
  _qzz_desc 
)
Value:
(__extension__({unsigned long _qzz_res;                  \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0 /* default return */, \
                            VG_USERREQ__CREATE_BLOCK,            \
                            _qzz_addr, _qzz_len, _qzz_desc,      \
                            0, 0);                               \
    _qzz_res;                                                    \
   }))

Definition at line 154 of file memcheck.h.

#define VALGRIND_DISCARD (   _qzz_blkindex)
Value:
(__extension__ ({unsigned long _qzz_res;                      \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0 /* default return */, \
                            VG_USERREQ__DISCARD,                 \
                            0, _qzz_blkindex, 0, 0, 0);          \
    _qzz_res;                                                    \
   }))

Definition at line 165 of file memcheck.h.

#define VALGRIND_CHECK_MEM_IS_ADDRESSABLE (   _qzz_addr,
  _qzz_len 
)
Value:
(__extension__({unsigned long _qzz_res;                       \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                      \
                            VG_USERREQ__CHECK_MEM_IS_ADDRESSABLE,\
                            _qzz_addr, _qzz_len, 0, 0, 0);       \
    _qzz_res;                                                    \
   }))

Definition at line 180 of file memcheck.h.

#define VALGRIND_CHECK_MEM_IS_DEFINED (   _qzz_addr,
  _qzz_len 
)
Value:
(__extension__({unsigned long _qzz_res;                       \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                      \
                            VG_USERREQ__CHECK_MEM_IS_DEFINED,    \
                            _qzz_addr, _qzz_len, 0, 0, 0);       \
    _qzz_res;                                                    \
   }))

Definition at line 192 of file memcheck.h.

#define VALGRIND_CHECK_VALUE_IS_DEFINED (   __lvalue)
Value:
VALGRIND_CHECK_MEM_IS_DEFINED(                                \
      (volatile unsigned char *)&(__lvalue),                     \
                      (unsigned long)(sizeof (__lvalue)))

Definition at line 205 of file memcheck.h.

Value:
{unsigned long _qzz_res;                                      \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                      \
                            VG_USERREQ__DO_LEAK_CHECK,           \
                            0, 0, 0, 0, 0);                      \
   }

Definition at line 212 of file memcheck.h.

Value:
{unsigned long _qzz_res;                                      \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                      \
                            VG_USERREQ__DO_LEAK_CHECK,           \
                            1, 0, 0, 0, 0);                      \
   }

Definition at line 220 of file memcheck.h.

#define VALGRIND_COUNT_LEAKS (   leaked,
  dubious,
  reachable,
  suppressed 
)
Value:
/* For safety on 64-bit platforms we assign the results to private
      unsigned long variables, then assign these to the lvalues the user
      specified, which works no matter what type 'leaked', 'dubious', etc
      are.  We also initialise '_qzz_leaked', etc because
      VG_USERREQ__COUNT_LEAKS doesn't mark the values returned as
      defined. */                                                        \
   {unsigned long _qzz_res;                                              \
    unsigned long _qzz_leaked    = 0, _qzz_dubious    = 0;               \
    unsigned long _qzz_reachable = 0, _qzz_suppressed = 0;               \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                              \
                               VG_USERREQ__COUNT_LEAKS,                  \
                               &_qzz_leaked, &_qzz_dubious,              \
                               &_qzz_reachable, &_qzz_suppressed, 0);    \
    leaked     = _qzz_leaked;                                            \
    dubious    = _qzz_dubious;                                           \
    reachable  = _qzz_reachable;                                         \
    suppressed = _qzz_suppressed;                                        \
   }

Definition at line 229 of file memcheck.h.

#define VALGRIND_COUNT_LEAK_BLOCKS (   leaked,
  dubious,
  reachable,
  suppressed 
)
Value:
/* For safety on 64-bit platforms we assign the results to private
      unsigned long variables, then assign these to the lvalues the user
      specified, which works no matter what type 'leaked', 'dubious', etc
      are.  We also initialise '_qzz_leaked', etc because
      VG_USERREQ__COUNT_LEAKS doesn't mark the values returned as
      defined. */                                                        \
   {unsigned long _qzz_res;                                              \
    unsigned long _qzz_leaked    = 0, _qzz_dubious    = 0;               \
    unsigned long _qzz_reachable = 0, _qzz_suppressed = 0;               \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                              \
                               VG_USERREQ__COUNT_LEAK_BLOCKS,            \
                               &_qzz_leaked, &_qzz_dubious,              \
                               &_qzz_reachable, &_qzz_suppressed, 0);    \
    leaked     = _qzz_leaked;                                            \
    dubious    = _qzz_dubious;                                           \
    reachable  = _qzz_reachable;                                         \
    suppressed = _qzz_suppressed;                                        \
   }

Definition at line 246 of file memcheck.h.

#define VALGRIND_GET_VBITS (   zza,
  zzvbits,
  zznbytes 
)
Value:
(__extension__({unsigned long _qzz_res;                       \
    char* czza     = (char*)zza;                                 \
    char* czzvbits = (char*)zzvbits;                             \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                      \
                            VG_USERREQ__GET_VBITS,               \
                            czza, czzvbits, zznbytes, 0, 0 );    \
    _qzz_res;                                                    \
   }))

Definition at line 271 of file memcheck.h.

#define VALGRIND_SET_VBITS (   zza,
  zzvbits,
  zznbytes 
)
Value:
(__extension__({unsigned int _qzz_res;                        \
    char* czza     = (char*)zza;                                 \
    char* czzvbits = (char*)zzvbits;                             \
    VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                      \
                            VG_USERREQ__SET_VBITS,               \
                            czza, czzvbits, zznbytes, 0, 0 );    \
    _qzz_res;                                                    \
   }))

Definition at line 290 of file memcheck.h.


Enumeration Type Documentation

Enumerator:
VG_USERREQ__MAKE_MEM_NOACCESS 
VG_USERREQ__MAKE_MEM_UNDEFINED 
VG_USERREQ__MAKE_MEM_DEFINED 
VG_USERREQ__DISCARD 
VG_USERREQ__CHECK_MEM_IS_ADDRESSABLE 
VG_USERREQ__CHECK_MEM_IS_DEFINED 
VG_USERREQ__DO_LEAK_CHECK 
VG_USERREQ__COUNT_LEAKS 
VG_USERREQ__GET_VBITS 
VG_USERREQ__SET_VBITS 
VG_USERREQ__CREATE_BLOCK 
VG_USERREQ__MAKE_MEM_DEFINED_IF_ADDRESSABLE 
VG_USERREQ__COUNT_LEAK_BLOCKS 
_VG_USERREQ__MEMCHECK_RECORD_OVERLAP_ERROR 

Definition at line 80 of file memcheck.h.


Function Documentation

FILE_LICENCE ( BSD3  )