Browse Source

use tmalloc and trealloc instead of MALLOC and REALLOC

pre-master-46
rlar 16 years ago
parent
commit
cc5b9007a7
  1. 7
      ChangeLog
  2. 2
      src/spicelib/analysis/cktmcrt.c
  3. 2
      src/spicelib/analysis/cktnewan.c
  4. 6
      src/xspice/cm/cmevt.c
  5. 2
      src/xspice/evt/evtload.c

7
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

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

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

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

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

Loading…
Cancel
Save