2002-11-19
2002-11-19 12:31:49 by Henrik Grubbström (Grubba) <grubba@grubba.org>
-
7ed49640195317d9b5ebf9a09283673d9036372d
(16 lines)
(+13/-3)
[
Show
| Annotate
]
Branch: 7.9
Should now support running valgrind with machine-code.
Rev: src/program.c:1.458
2:
|| This file is part of Pike. For copyright information see COPYRIGHT.
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| for more information.
- || $Id: program.c,v 1.457 2002/11/17 15:31:20 grubba Exp $
+ || $Id: program.c,v 1.458 2002/11/19 12:31:49 grubba Exp $
*/
#include "global.h"
- RCSID("$Id: program.c,v 1.457 2002/11/17 15:31:20 grubba Exp $");
+ RCSID("$Id: program.c,v 1.458 2002/11/19 12:31:49 grubba Exp $");
#include "program.h"
#include "object.h"
#include "dynamic_buffer.h"
806:
sizeof(TYPE) * \
state->malloc_size_program-> \
PIKE_CONCAT(num_,NAME)); \
- if(!tmp) Pike_fatal("Out of memory.\n"); \
+ if(!tmp) Pike_fatal("Out of memory.\n"); \
PIKE_CONCAT(RELOCATE_,NAME)(state->new_program, tmp); \
state->new_program->NAME=tmp; \
} \
822:
#include "program_areas.h"
+ #define add_to_program(ARG) do { \
+ debug_malloc_touch(Pike_compiler->new_program->program); \
+ add_to_program(ARG); \
+ } while(0)
+
void ins_int(INT32 i, void (*func)(char tmp))
{
int e;
7002: Inside #if defined(FLUSH_INSTRUCTION_CACHE)
FLUSH_INSTRUCTION_CACHE(p->program,
p->num_program*sizeof(p->program[0]));
#endif /* FLUSH_INSTRUCTION_CACHE */
+ #ifdef VALGRIND_DISCARD_TRANSLATIONS
+ VALGRIND_DISCARD_TRANSLATIONS(p->program,
+ p->num_program*sizeof(p->program[0]));
+ #endif /* VALGRIND_DISCARD_TRANSLATIONS */
}
#endif