diff --git a/src/frontend/parse-bison-y.h b/src/frontend/parse-bison-y.h index aa1c32cc4..4b39281f1 100644 --- a/src/frontend/parse-bison-y.h +++ b/src/frontend/parse-bison-y.h @@ -14,3 +14,6 @@ extern struct pnode *PP_mksnode(const char *string); #if defined (_MSC_VER) # define __func__ __FUNCTION__ /* __func__ is C99, but MSC can't */ #endif + +#define malloc tmalloc +#define free txfree diff --git a/src/maths/cmaths/cmath1.c b/src/maths/cmaths/cmath1.c index d5d2b7734..0b9bb1abc 100644 --- a/src/maths/cmaths/cmath1.c +++ b/src/maths/cmaths/cmath1.c @@ -731,7 +731,7 @@ cx_sortorder(void *data, short int type, int length, int *newlength, short int * int i; amplitude_index_t *array_amplitudes; - array_amplitudes = (amplitude_index_t *) malloc(sizeof(amplitude_index_t) * (size_t) length); + array_amplitudes = (amplitude_index_t *) tmalloc(sizeof(amplitude_index_t) * (size_t) length); *newlength = length; *newtype = VF_REAL; diff --git a/src/spicelib/devices/bsimsoi/b4soitemp.c b/src/spicelib/devices/bsimsoi/b4soitemp.c index 052748ba0..36cf13826 100644 --- a/src/spicelib/devices/bsimsoi/b4soitemp.c +++ b/src/spicelib/devices/bsimsoi/b4soitemp.c @@ -185,7 +185,7 @@ B4SOItemp( } if (Size_Not_Found) - { pParam = (struct b4soiSizeDependParam *)malloc( + { pParam = (struct b4soiSizeDependParam *)tmalloc( sizeof(struct b4soiSizeDependParam)); if (pLastKnot == NULL) model->pSizeDependParamKnot = pParam; diff --git a/src/spicelib/parser/inpptree-parser-y.h b/src/spicelib/parser/inpptree-parser-y.h index e72b39442..24acd8d36 100644 --- a/src/spicelib/parser/inpptree-parser-y.h +++ b/src/spicelib/parser/inpptree-parser-y.h @@ -13,3 +13,6 @@ extern INPparseNode *PT_mksnode(const char *string, void *ckt); #if defined (_MSC_VER) # define __func__ __FUNCTION__ /* __func__ is C99, but MSC can't */ #endif + +#define malloc tmalloc +#define free txfree