Browse Source

plug a memory leak in bsim models

pre-master-46
dwarning 8 years ago
parent
commit
06fb917b82
  1. 7
      src/spicelib/devices/bsim2/b2temp.c
  2. 7
      src/spicelib/devices/bsim3soi_dd/b3soiddtemp.c
  3. 7
      src/spicelib/devices/bsim3soi_fd/b3soifdtemp.c
  4. 7
      src/spicelib/devices/bsim3soi_pd/b3soipdtemp.c
  5. 7
      src/spicelib/devices/bsim3v0/b3v0temp.c
  6. 7
      src/spicelib/devices/bsim3v1/b3v1temp.c
  7. 7
      src/spicelib/devices/bsim3v32/b3v32temp.c
  8. 7
      src/spicelib/devices/bsim4/b4temp.c
  9. 7
      src/spicelib/devices/bsim4v5/b4v5temp.c
  10. 7
      src/spicelib/devices/bsim4v6/b4v6temp.c
  11. 7
      src/spicelib/devices/bsim4v7/b4v7temp.c
  12. 7
      src/spicelib/devices/bsimsoi/b4soitemp.c

7
src/spicelib/devices/bsim2/b2temp.c

@ -46,6 +46,13 @@ B2temp(GENmodel *inModel, CKTcircuit *ckt)
model->B2vgg2 = 2.0 * model->B2vgg;
model->B2vbb2 = 2.0 * model->B2vbb;
model->B2Vtm = 8.625e-5 * (model->B2temp + 273.0);
struct bsim2SizeDependParam *p = model->pSizeDependParamKnot;
while (p) {
struct bsim2SizeDependParam *next_p = p->pNext;
FREE(p);
p = next_p;
}
model->pSizeDependParamKnot = NULL;
pLastKnot = NULL;

7
src/spicelib/devices/bsim3soi_dd/b3soiddtemp.c

@ -50,6 +50,13 @@ int Size_Not_Found;
{ Temp = ckt->CKTtemp;
if (model->B3SOIDDGatesidewallJctPotential < 0.1)
model->B3SOIDDGatesidewallJctPotential = 0.1;
struct b3soiddSizeDependParam *p = model->pSizeDependParamKnot;
while (p) {
struct b3soiddSizeDependParam *next_p = p->pNext;
FREE(p);
p = next_p;
}
model->pSizeDependParamKnot = NULL;
pLastKnot = NULL;

7
src/spicelib/devices/bsim3soi_fd/b3soifdtemp.c

@ -49,6 +49,13 @@ int Size_Not_Found;
{ Temp = ckt->CKTtemp;
if (model->B3SOIFDGatesidewallJctPotential < 0.1)
model->B3SOIFDGatesidewallJctPotential = 0.1;
struct b3soifdSizeDependParam *p = model->pSizeDependParamKnot;
while (p) {
struct b3soifdSizeDependParam *next_p = p->pNext;
FREE(p);
p = next_p;
}
model->pSizeDependParamKnot = NULL;
pLastKnot = NULL;

7
src/spicelib/devices/bsim3soi_pd/b3soipdtemp.c

@ -68,6 +68,13 @@ double tmp3, T7;
{ Temp = ckt->CKTtemp;
if (model->B3SOIPDGatesidewallJctPotential < 0.1)
model->B3SOIPDGatesidewallJctPotential = 0.1;
struct b3soipdSizeDependParam *p = model->pSizeDependParamKnot;
while (p) {
struct b3soipdSizeDependParam *next_p = p->pNext;
FREE(p);
p = next_p;
}
model->pSizeDependParamKnot = NULL;
pLastKnot = NULL;

7
src/spicelib/devices/bsim3v0/b3v0temp.c

@ -42,6 +42,13 @@ int Size_Not_Found;
model->BSIM3v0bulkJctPotential = 0.1;
if (model->BSIM3v0sidewallJctPotential < 0.1)
model->BSIM3v0sidewallJctPotential = 0.1;
struct bsim3v0SizeDependParam *p = model->pSizeDependParamKnot;
while (p) {
struct bsim3v0SizeDependParam *next_p = p->pNext;
FREE(p);
p = next_p;
}
model->pSizeDependParamKnot = NULL;
pLastKnot = NULL;

7
src/spicelib/devices/bsim3v1/b3v1temp.c

@ -51,6 +51,13 @@ int Size_Not_Found;
model->BSIM3v1sidewallJctPotential = 0.1;
if (model->BSIM3v1GatesidewallJctPotential < 0.1)
model->BSIM3v1GatesidewallJctPotential = 0.1;
struct bsim3v1SizeDependParam *p = model->pSizeDependParamKnot;
while (p) {
struct bsim3v1SizeDependParam *next_p = p->pNext;
FREE(p);
p = next_p;
}
model->pSizeDependParamKnot = NULL;
pLastKnot = NULL;

7
src/spicelib/devices/bsim3v32/b3v32temp.c

@ -55,6 +55,13 @@ int Size_Not_Found, error;
{ model->BSIM3v32GatesidewallJctPotential = 0.1;
fprintf(stderr, "Given pbswg is less than 0.1. Pbswg is set to 0.1.\n");
}
struct bsim3v32SizeDependParam *p = model->pSizeDependParamKnot;
while (p) {
struct bsim3v32SizeDependParam *next_p = p->pNext;
FREE(p);
p = next_p;
}
model->pSizeDependParamKnot = NULL;
pLastKnot = NULL;

7
src/spicelib/devices/bsim4/b4temp.c

@ -220,6 +220,13 @@ int Size_Not_Found, i;
}
if (!model->BSIM4cgboGiven)
model->BSIM4cgbo = 2.0 * model->BSIM4dwc * model->BSIM4coxe;
struct bsim4SizeDependParam *p = model->pSizeDependParamKnot;
while (p) {
struct bsim4SizeDependParam *next_p = p->pNext;
FREE(p);
p = next_p;
}
model->pSizeDependParamKnot = NULL;
pLastKnot = NULL;

7
src/spicelib/devices/bsim4v5/b4v5temp.c

@ -138,6 +138,13 @@ int Size_Not_Found, i;
}
if (!model->BSIM4v5cgboGiven)
model->BSIM4v5cgbo = 2.0 * model->BSIM4v5dwc * model->BSIM4v5coxe;
struct bsim4v5SizeDependParam *p = model->pSizeDependParamKnot;
while (p) {
struct bsim4v5SizeDependParam *next_p = p->pNext;
FREE(p);
p = next_p;
}
model->pSizeDependParamKnot = NULL;
pLastKnot = NULL;

7
src/spicelib/devices/bsim4v6/b4v6temp.c

@ -163,6 +163,13 @@ int Size_Not_Found, i;
}
if (!model->BSIM4v6cgboGiven)
model->BSIM4v6cgbo = 2.0 * model->BSIM4v6dwc * model->BSIM4v6coxe;
struct bsim4v6SizeDependParam *p = model->pSizeDependParamKnot;
while (p) {
struct bsim4v6SizeDependParam *next_p = p->pNext;
FREE(p);
p = next_p;
}
model->pSizeDependParamKnot = NULL;
pLastKnot = NULL;

7
src/spicelib/devices/bsim4v7/b4v7temp.c

@ -184,6 +184,13 @@ int Size_Not_Found, i;
}
if (!model->BSIM4v7cgboGiven)
model->BSIM4v7cgbo = 2.0 * model->BSIM4v7dwc * model->BSIM4v7coxe;
struct bsim4SizeDependParam *p = model->pSizeDependParamKnot;
while (p) {
struct bsim4SizeDependParam *next_p = p->pNext;
FREE(p);
p = next_p;
}
model->pSizeDependParamKnot = NULL;
pLastKnot = NULL;

7
src/spicelib/devices/bsimsoi/b4soitemp.c

@ -89,6 +89,13 @@ B4SOItemp(
model->B4SOIGatesidewallJctSPotential = 0.1;
if (model->B4SOIGatesidewallJctDPotential < 0.1) /* v4.0 */
model->B4SOIGatesidewallJctDPotential = 0.1;
struct b4soiSizeDependParam *p = model->pSizeDependParamKnot;
while (p) {
struct b4soiSizeDependParam *next_p = p->pNext;
FREE(p);
p = next_p;
}
model->pSizeDependParamKnot = NULL;
pLastKnot = NULL;

Loading…
Cancel
Save