diff --git a/ChangeLog b/ChangeLog index f79180a7d..d25215866 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-10-27 Robert Larice + * src/spicelib/analysis/cktmcrt.c , + * src/spicelib/analysis/cktnewan.c , + * src/xspice/cm/cmevt.c , + * src/xspice/evt/evtload.c : + use tmalloc and trealloc instead of MALLOC and REALLOC + 2010-10-27 Robert Larice * src/spicelib/analysis/distoan.c : bug fix ?, this fix is a mere guesswork, FIXME diff --git a/src/spicelib/analysis/cktmcrt.c b/src/spicelib/analysis/cktmcrt.c index f569b3bde..1ecbcb78b 100644 --- a/src/spicelib/analysis/cktmcrt.c +++ b/src/spicelib/analysis/cktmcrt.c @@ -25,7 +25,7 @@ CKTmodCrt(CKTcircuit *ckt, int type, GENmodel **modfast, IFuid name) error = CKTfndMod(ckt, &type, &mymodfast, name); if(error == E_NOMOD) { - mymodfast = (GENmodel *)MALLOC(*(DEVices[type]->DEVmodSize)); + mymodfast = (GENmodel *) tmalloc((size_t) *(DEVices[type]->DEVmodSize)); if(mymodfast == (GENmodel *)NULL) return(E_NOMEM); mymodfast->GENmodType = type; mymodfast->GENmodName = name; diff --git a/src/spicelib/analysis/cktnewan.c b/src/spicelib/analysis/cktnewan.c index 2faaed20d..12b140a39 100644 --- a/src/spicelib/analysis/cktnewan.c +++ b/src/spicelib/analysis/cktnewan.c @@ -25,7 +25,7 @@ CKTnewAnal(CKTcircuit *ckt, int type, IFuid name, JOB **analPtr, TSKtask *taskPt (*analPtr)->JOBtype = type; return(OK); /* doesn't need to be created */ } - *analPtr = (JOB *)MALLOC(analInfo[type]->size); + *analPtr = (JOB *) tmalloc((size_t) analInfo[type]->size); if(*analPtr==NULL) return(E_NOMEM); (*analPtr)->JOBname = name; (*analPtr)->JOBtype = type; diff --git a/src/xspice/cm/cmevt.c b/src/xspice/cm/cmevt.c index d21c724e0..df4c5dca8 100755 --- a/src/xspice/cm/cmevt.c +++ b/src/xspice/cm/cmevt.c @@ -131,10 +131,10 @@ void cm_event_alloc( /* Create or enlarge the block and set the time */ if(num_tags == 1) - state->block = MALLOC(state_data->total_size[inst_index]); + state->block = tmalloc((size_t) state_data->total_size[inst_index]); else - state->block = REALLOC(state->block, - state_data->total_size[inst_index]); + state->block = trealloc(state->block, + (size_t) state_data->total_size[inst_index]); state->step = g_mif_info.circuit.evt_step; } diff --git a/src/xspice/evt/evtload.c b/src/xspice/evt/evtload.c index a0a3d8b01..be4f11c72 100755 --- a/src/xspice/evt/evtload.c +++ b/src/xspice/evt/evtload.c @@ -346,7 +346,7 @@ static void EVTcreate_state( { new_state = (Evt_State_t *) MALLOC(sizeof(Evt_State_t)); - new_state->block = MALLOC(total_size); + new_state->block = tmalloc((size_t) total_size); }