Holger Vogt
9452121954
Remove memory leaks in cmpp.
Two small ones (a few bytes) are still there, difficult to assess.
6 years ago
Holger Vogt
29b2799c22
plug a memory leak by CALLBACK,
deleting locally malloced memory
6 years ago
Holger Vogt
e89a92f944
prevent referencing a NULL pointer
free the loc pointer and NULL its origin STATIC_VAR (locdata)
(that translates to mif_private->inst_var[0]->element[0].pvalue)
6 years ago
Holger Vogt
2f396187fa
Better indentation of message
7 years ago
Holger Vogt
0575481206
Better info in case of error
Initited by a patch from Bohdan Tkhir
7 years ago
Holger Vogt
88008af088
remove memory leaks
7 years ago
Holger Vogt
7bb8049d2a
fix bug no. 394, reported by Yurii Demchyna
7 years ago
Holger Vogt
198fea0db4
-rm -> rm, re-enable 'make uninstall'
7 years ago
Holger Vogt
f9f28f7679
MS Windows: Use only POSIX compliant snprintf
7 years ago
Holger Vogt
c2db1d5547
Bug 385 enable variable numdgt for printout
7 years ago
dwarning
edb42b526d
Add comment for better understanding.
7 years ago
dwarning
390d0bddd9
Dereferencing of the null pointer 'p' might take place. Remove unused variable.
7 years ago
Holger Vogt
96f3b7b029
bug 380, fix removal of string vector after setting the model parameters
7 years ago
Holger Vogt
34f0e98080
plug a memory leak, delete 'element', if tmalloced before
7 years ago
Holger Vogt
0d9d228c11
Put the copy for generating permanent next_token exactly at the places
where is is needed: INPtermInsert() and fast->conn...->neg_node_str
XSPICE memory leaks are gone!
7 years ago
Holger Vogt
2a6212f77e
Add a function gc_start to reset the garbage collector
7 years ago
Holger Vogt
4e6de9626e
** A local garbage collector **
Add the list of malloced addresses alltokens.
Add a function copy_gc to copy and enter the address.
Add a function gc_end to delete all entries in alltokens.
Beware of addresses deleted elsewhere and use anew by malloc.
Some tokens should not be deleted here, they get another copying.
7 years ago
Holger Vogt
fb1970e25a
add gc functions to replace MIFgettok and MIFget_token
7 years ago
Holger Vogt
ccb7fa410b
remove all instances of tfree.
Code is working, but full of memory leaks.
7 years ago
Holger Vogt
f9c956ff6b
mif_inp2.c, improve on memory leaks
Delete token before generating it anew, delete def_port_str
only if not already done before.
Still there are some tiny leaks left.
7 years ago
Holger Vogt
7b57800df6
bug 378 put tfree(def_port_type_str) to an appropriate place.
7 years ago
dwarning
d7089adcaf
Also in case of allocation error we have to free existing memory before return.
7 years ago
dwarning
a6fa3aaa11
The 'then' statement was equivalent to the 'else' statement.
Also moredimensional poly sources need only one closing bracket for input port.
7 years ago
Holger Vogt
4738edeab5
symbol visibility=hidden only in release mode
for shared library and codemodels
8 years ago
Holger Vogt
45e269819e
fix a bug
8 years ago
dwarning
56bc8af358
calloc needs stdlib.h
8 years ago
Holger Vogt
0b7c291f37
replace Id by Idd.
Use Revilimit instead of Ilimit.
Correct for current limits.
8 years ago
Holger Vogt
a22017024b
add some info to file header
8 years ago
Holger Vogt
faa7ce003c
Add a new code model 'sidiode' with a simple diode:
Linear reverse, off, and on regions
Smooth parabolic transition between the regions
Maximum current settings possible with tanh transistion
Current versus voltage continuously differentiable
No diode capacitance
8 years ago
Holger Vogt
a17de08b5c
free only value that have been TMALLOCed or TREALLOCed
8 years ago
Holger Vogt
5f0b2f344e
spurious crash: MIFgettok deliveres strings that cannot be freed:
MS Windows, VS or MSYS2/MINGW/GCC, shared ngspice, single character
token at end of line, compiled with optimization, not in debug mode.
Preliminary fix: TMALLOC another byte to token.
Origin of bug still unknown: Source code error? MS library error?
Re-write of MIFgettok does not show this error (so far...).
8 years ago
Holger Vogt
40e69ceaf4
plug a memory leak after (internal) call to altermod
8 years ago
Holger Vogt
8b02c31326
prevent reading beyond array boundaries
8 years ago
Holger Vogt
800c9711f2
add a flag 'type of the union' to safely free model->param[i]->element,
if it contain a malloced string
8 years ago
Holger Vogt
2867678f99
For unsetup de-allocate the memory
that has been allocated locally in the code model during INIT
8 years ago
Holger Vogt
c4f8a02eb0
add a callback to de-allocate the static variable p->element
8 years ago
Holger Vogt
80a767f6cd
add here->intgr to the de-allocated memory
8 years ago
Holger Vogt
21edfb2127
safety measure against here->conn[i]->port[j]->partial etc.
being NULL
8 years ago
Holger Vogt
a5179b1637
free memory allocated in MIFsetup and by cm_analog_alloc and cm_analog_converge
8 years ago
Holger Vogt
c87dd6161f
mifsetup.c: use astyle to beautify the code for better readability
8 years ago
Holger Vogt
9cd9bf345c
mif_inp2.c: remove a memory leak
8 years ago
Holger Vogt
b1f956f81c
fix a memory leak
8 years ago
Holger Vogt
d8352342a8
free more data allocated during INIT
8 years ago
Holger Vogt
c891c2f64f
Update to callback function:
delete memory also in the eno structure
do not close a file twice
8 years ago
Holger Vogt
d26d1b96ec
add callback function to delete the memory
allocated in the code model
8 years ago
Holger Vogt
9d36a2e326
remove unused i
8 years ago
Holger Vogt
2ce4c1592b
a tiny memory leak
8 years ago
Holger Vogt
0bc1d8147c
plug a memory leak
8 years ago
Holger Vogt
a6f525f6c1
fix a memory leak
8 years ago
Holger Vogt
9db2bf3d69
fix a memory leak
8 years ago