Add missing Valgrind macros to jmem (#3025)

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This commit is contained in:
Dániel Bátyai
2019-08-28 14:59:06 +02:00
committed by GitHub
parent 5fa0a690eb
commit e3c1451d42
2 changed files with 21 additions and 9 deletions
@@ -35,12 +35,14 @@
# define JMEM_VALGRIND_UNDEFINED_SPACE(p, s) VALGRIND_MAKE_MEM_UNDEFINED((p), (s))
# define JMEM_VALGRIND_DEFINED_SPACE(p, s) VALGRIND_MAKE_MEM_DEFINED((p), (s))
# define JMEM_VALGRIND_MALLOCLIKE_SPACE(p, s) VALGRIND_MALLOCLIKE_BLOCK((p), (s), 0, 0)
# define JMEM_VALGRIND_RESIZE_SPACE(p, o, n) VALGRIND_RESIZEINPLACE_BLOCK((p), (o), (n), 0)
# define JMEM_VALGRIND_FREELIKE_SPACE(p) VALGRIND_FREELIKE_BLOCK((p), 0)
#else /* !ENABLED (JERRY_VALGRIND) */
# define JMEM_VALGRIND_NOACCESS_SPACE(p, s)
# define JMEM_VALGRIND_UNDEFINED_SPACE(p, s)
# define JMEM_VALGRIND_DEFINED_SPACE(p, s)
# define JMEM_VALGRIND_MALLOCLIKE_SPACE(p, s)
# define JMEM_VALGRIND_RESIZE_SPACE(p, o, n)
# define JMEM_VALGRIND_FREELIKE_SPACE(p)
#endif /* ENABLED (JERRY_VALGRIND) */
/** @} */