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.
8 years ago
dwarning
d7089adcaf
Also in case of allocation error we have to free existing memory before return.
8 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.
8 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
Holger Vogt
eab5615fb3
examples moved to examples/xspice/original-examples
8 years ago
Holger Vogt
908339359a
clarify start time generation
clarify time and amplitude updates
don't read comment lines
8 years ago
Holger Vogt
d1761f8d6e
read the complete input file at once during inizialization
instaed of reading the file line by line,
and instaed of re-reading from the beginning in case
of time stepping back. This saves a vast amount of
simulation time if the input file is large.
8 years ago
Holger Vogt
824ac4fbc9
make functions static or add function prototypes
8 years ago
Holger Vogt
42a86d0ff2
patch provided by Uros Platise: timeunit selection
for printing vcd file is now based on tstep instead of tstop
8 years ago
h_vogt
7198056a41
patch no. 16 by Thomy add a function cm_get_circuit to allow accessing the circuit structure ckt from within an XSPICE code model. This is a change to the interface and requires recopiling all code models!
10 years ago
h_vogt
11bafd70ea
update to callback functions SendEvtData, SendInitEvtData
9 years ago
h_vogt
c890435383
clarify pointers to data structures for event nodes
9 years ago