use tmalloc and trealloc instead of MALLOC and REALLOC
This commit is contained in:
parent
5edf18bbc8
commit
cc5b9007a7
|
|
@ -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
|
2010-10-27 Robert Larice
|
||||||
* src/spicelib/analysis/distoan.c :
|
* src/spicelib/analysis/distoan.c :
|
||||||
bug fix ?, this fix is a mere guesswork, FIXME
|
bug fix ?, this fix is a mere guesswork, FIXME
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ CKTmodCrt(CKTcircuit *ckt, int type, GENmodel **modfast, IFuid name)
|
||||||
|
|
||||||
error = CKTfndMod(ckt, &type, &mymodfast, name);
|
error = CKTfndMod(ckt, &type, &mymodfast, name);
|
||||||
if(error == E_NOMOD) {
|
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);
|
if(mymodfast == (GENmodel *)NULL) return(E_NOMEM);
|
||||||
mymodfast->GENmodType = type;
|
mymodfast->GENmodType = type;
|
||||||
mymodfast->GENmodName = name;
|
mymodfast->GENmodName = name;
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ CKTnewAnal(CKTcircuit *ckt, int type, IFuid name, JOB **analPtr, TSKtask *taskPt
|
||||||
(*analPtr)->JOBtype = type;
|
(*analPtr)->JOBtype = type;
|
||||||
return(OK); /* doesn't need to be created */
|
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);
|
if(*analPtr==NULL) return(E_NOMEM);
|
||||||
(*analPtr)->JOBname = name;
|
(*analPtr)->JOBname = name;
|
||||||
(*analPtr)->JOBtype = type;
|
(*analPtr)->JOBtype = type;
|
||||||
|
|
|
||||||
|
|
@ -131,10 +131,10 @@ void cm_event_alloc(
|
||||||
|
|
||||||
/* Create or enlarge the block and set the time */
|
/* Create or enlarge the block and set the time */
|
||||||
if(num_tags == 1)
|
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
|
else
|
||||||
state->block = REALLOC(state->block,
|
state->block = trealloc(state->block,
|
||||||
state_data->total_size[inst_index]);
|
(size_t) state_data->total_size[inst_index]);
|
||||||
|
|
||||||
state->step = g_mif_info.circuit.evt_step;
|
state->step = g_mif_info.circuit.evt_step;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -346,7 +346,7 @@ static void EVTcreate_state(
|
||||||
{
|
{
|
||||||
|
|
||||||
new_state = (Evt_State_t *) MALLOC(sizeof(Evt_State_t));
|
new_state = (Evt_State_t *) MALLOC(sizeof(Evt_State_t));
|
||||||
new_state->block = MALLOC(total_size);
|
new_state->block = tmalloc((size_t) total_size);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue