use tmalloc and trealloc instead of MALLOC and REALLOC

This commit is contained in:
rlar 2010-10-27 16:34:27 +00:00
parent 5edf18bbc8
commit cc5b9007a7
5 changed files with 13 additions and 6 deletions

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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);
}