Add support for valgrind cleanup of APV in task call.
This commit is contained in:
parent
81ba40456f
commit
60b1ade52d
13
vvp/array.cc
13
vvp/array.cc
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2012 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2007-2013 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -914,6 +914,11 @@ static int vpi_array_vthr_APV_get(int code, vpiHandle ref)
|
||||||
case vpiAutomatic:
|
case vpiAutomatic:
|
||||||
return (int) parent->scope->is_automatic;
|
return (int) parent->scope->is_automatic;
|
||||||
|
|
||||||
|
#ifdef CHECK_WITH_VALGRIND
|
||||||
|
case _vpiFromThr:
|
||||||
|
return _vpi_at_APV;
|
||||||
|
#endif
|
||||||
|
|
||||||
case vpiConstantSelect:
|
case vpiConstantSelect:
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
|
@ -1946,4 +1951,10 @@ void A_delete(vpiHandle item)
|
||||||
|
|
||||||
delete obj;
|
delete obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void APV_delete(vpiHandle item)
|
||||||
|
{
|
||||||
|
struct __vpiArrayVthrAPV*obj = (struct __vpiArrayVthrAPV*) item;
|
||||||
|
delete obj;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef __vpi_priv_H
|
#ifndef __vpi_priv_H
|
||||||
#define __vpi_priv_H
|
#define __vpi_priv_H
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001-2012 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2001-2013 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -59,12 +59,13 @@ extern vpiHandle vpip_build_file_line(char*description,
|
||||||
*/
|
*/
|
||||||
#ifdef CHECK_WITH_VALGRIND
|
#ifdef CHECK_WITH_VALGRIND
|
||||||
#define _vpiFromThr 0x1000001
|
#define _vpiFromThr 0x1000001
|
||||||
# define _vpiNoThr 0
|
# define _vpiNoThr 0
|
||||||
# define _vpiString 1
|
# define _vpiString 1
|
||||||
# define _vpiVThr 2
|
# define _vpiVThr 2
|
||||||
# define _vpiWord 3
|
# define _vpiWord 3
|
||||||
# define _vpi_at_PV 4
|
# define _vpi_at_PV 4
|
||||||
# define _vpi_at_A 5
|
# define _vpi_at_A 5
|
||||||
|
# define _vpi_at_APV 6
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001-2012 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2001-2013 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -857,8 +857,13 @@ void vpi_call_delete(vpiHandle item)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case vpiMemoryWord:
|
case vpiMemoryWord:
|
||||||
if (vpi_get(_vpiFromThr, obj->args[arg]) == _vpi_at_A) {
|
switch (vpi_get(_vpiFromThr, obj->args[arg])) {
|
||||||
|
case _vpi_at_A:
|
||||||
A_delete(obj->args[arg]);
|
A_delete(obj->args[arg]);
|
||||||
|
break;
|
||||||
|
case _vpi_at_APV:
|
||||||
|
APV_delete(obj->args[arg]);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case vpiPartSelect:
|
case vpiPartSelect:
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef __vvp_cleanup_H
|
#ifndef __vvp_cleanup_H
|
||||||
#define __vvp_cleanup_H
|
#define __vvp_cleanup_H
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 Cary R. (cygcary@yahoo.com)
|
* Copyright (c) 2009-2013 Cary R. (cygcary@yahoo.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -41,6 +41,7 @@ extern void vvp_net_pool_delete(void);
|
||||||
extern void ufunc_pool_delete(void);
|
extern void ufunc_pool_delete(void);
|
||||||
|
|
||||||
extern void A_delete(class __vpiHandle *item);
|
extern void A_delete(class __vpiHandle *item);
|
||||||
|
extern void APV_delete(class __vpiHandle *item);
|
||||||
extern void PV_delete(class __vpiHandle *item);
|
extern void PV_delete(class __vpiHandle *item);
|
||||||
extern void class_delete(class __vpiHandle *item);
|
extern void class_delete(class __vpiHandle *item);
|
||||||
extern void constant_delete(class __vpiHandle *item);
|
extern void constant_delete(class __vpiHandle *item);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue