tmalloc patch R Larice
This commit is contained in:
parent
8a69132a1c
commit
8ddd172cc9
|
|
@ -1,3 +1,8 @@
|
|||
2010-05-14 Holger Vogt
|
||||
* dllitf.h, cplsetup.c, cmexport.c, int/udnfunc.c, real/udnfunc.c, xspice.c:
|
||||
tmalloc patch by R Larice
|
||||
vngspice.sln, vngspice.proj: 64 bit support
|
||||
|
||||
2010-05-11 Holger Vogt
|
||||
* inpcom.c: new fcn inp_fix_gnd_name: 'gnd' replaced by ' 0 ', if delimiters
|
||||
are '(' or ' ' or ',' on the left and ')' or ' ' or ',' on the right.
|
||||
|
|
|
|||
|
|
@ -72,9 +72,9 @@ struct coreInfo_t {
|
|||
void * ((*dllitf_calloc_pj)(size_t, size_t));
|
||||
void * ((*dllitf_realloc_pj)(void *, size_t));
|
||||
void ((*dllitf_free_pj)(void *));
|
||||
char * ((*dllitf_tmalloc)(int));
|
||||
char * ((*dllitf_trealloc)(char *, int));
|
||||
void ((*dllitf_txfree)(char *));
|
||||
void * ((*dllitf_tmalloc)(size_t));
|
||||
void * ((*dllitf_trealloc)(void *, size_t));
|
||||
void ((*dllitf_txfree)(void *));
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1890,9 +1890,6 @@ static int divC(double ar, double ai, double br, double bi, double *cr, double *
|
|||
static NODE
|
||||
*NEW_node(void)
|
||||
{
|
||||
/*
|
||||
char *tmalloc();
|
||||
*/
|
||||
NODE *n;
|
||||
|
||||
n = (NODE *) tmalloc (sizeof (NODE));
|
||||
|
|
|
|||
|
|
@ -3,13 +3,18 @@
|
|||
#include <cm.h>
|
||||
#include <dllitf.h>
|
||||
|
||||
#define U(x) (void)x
|
||||
|
||||
/*how annoying!, needed for structure below*/
|
||||
static void *tcalloc(size_t a, size_t b){
|
||||
return tmalloc(a*b);
|
||||
static void *tcalloc(size_t a, size_t b) {
|
||||
return tmalloc(a*b); /* FIXME, tcalloc must zero !?!? */
|
||||
}
|
||||
|
||||
static void *empty(void){
|
||||
static void no_free(void *p) {
|
||||
U(p);
|
||||
}
|
||||
|
||||
static FILE * no_file(void) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -58,24 +63,24 @@ struct coreInfo_t coreInfo =
|
|||
cm_complex_subtract,
|
||||
cm_complex_multiply,
|
||||
cm_complex_divide,
|
||||
(FILE *(*)(void))empty,
|
||||
(FILE *(*)(void))empty,
|
||||
(FILE *(*)(void))empty,
|
||||
no_file,
|
||||
no_file,
|
||||
no_file,
|
||||
#ifndef HAVE_LIBGC
|
||||
tmalloc,
|
||||
tcalloc,
|
||||
trealloc,
|
||||
txfree,
|
||||
(char *(*)(int))tmalloc,
|
||||
(char *(*)(char *,int))trealloc,
|
||||
(void (*)(char *))txfree
|
||||
tmalloc,
|
||||
trealloc,
|
||||
txfree
|
||||
#else
|
||||
GC_malloc,
|
||||
tcalloc,
|
||||
GC_realloc,
|
||||
(void (*)(void *))empty,
|
||||
(char *(*)(int))GC_malloc,
|
||||
(char *(*)(char *,int))GC_realloc,
|
||||
(void (*)(char *))empty
|
||||
no_free,
|
||||
GC_malloc,
|
||||
GC_realloc,
|
||||
no_free
|
||||
#endif
|
||||
};
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ NON-STANDARD FEATURES
|
|||
|
||||
#include "evtudn.h"
|
||||
|
||||
void *tmalloc(unsigned);
|
||||
void *tmalloc(size_t);
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ NON-STANDARD FEATURES
|
|||
|
||||
#include "evtudn.h"
|
||||
|
||||
void *tmalloc(unsigned);
|
||||
void *tmalloc(size_t);
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,18 @@
|
|||
#include <cm.h>
|
||||
#include <dllitf.h>
|
||||
|
||||
#define U(x) (void)x
|
||||
|
||||
/*how annoying!, needed for structure below*/
|
||||
void *tcalloc(size_t a, size_t b){
|
||||
return tmalloc(a*b);
|
||||
static void *tcalloc(size_t a, size_t b) {
|
||||
return tmalloc(a*b); /* FIXME, tcalloc must zero !?!? */
|
||||
}
|
||||
|
||||
static void *empty(void){
|
||||
static void no_free(void *p) {
|
||||
U(p);
|
||||
}
|
||||
|
||||
static FILE * no_file(void) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -58,24 +63,24 @@ struct coreInfo_t coreInfo =
|
|||
cm_complex_subtract,
|
||||
cm_complex_multiply,
|
||||
cm_complex_divide,
|
||||
(FILE *(*)(void))empty,
|
||||
(FILE *(*)(void))empty,
|
||||
(FILE *(*)(void))empty,
|
||||
no_file,
|
||||
no_file,
|
||||
no_file,
|
||||
#ifndef HAVE_LIBGC
|
||||
tmalloc,
|
||||
tcalloc,
|
||||
trealloc,
|
||||
txfree,
|
||||
(char *(*)(int))tmalloc,
|
||||
(char *(*)(char *,int))trealloc,
|
||||
(void (*)(char *))txfree
|
||||
tmalloc,
|
||||
trealloc,
|
||||
txfree
|
||||
#else
|
||||
GC_malloc,
|
||||
tcalloc,
|
||||
GC_realloc,
|
||||
(void (*)(void *))empty,
|
||||
(char *(*)(int))GC_malloc,
|
||||
(char *(*)(char *,int))GC_realloc,
|
||||
(void (*)(char *))empty
|
||||
no_free,
|
||||
GC_malloc,
|
||||
GC_realloc,
|
||||
no_free
|
||||
#endif
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,47 +1,44 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual C++ Express 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vngspice", "vngspice.vcproj", "{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
console_debug|Win32 = console_debug|Win32
|
||||
console_debug|x64 = console_debug|x64
|
||||
console_release|Win32 = console_release|Win32
|
||||
console_release|x64 = console_release|x64
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
release64|Win32 = release64|Win32
|
||||
release64|x64 = release64|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_debug|Win32.ActiveCfg = console_debug|Win32
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_debug|Win32.Build.0 = console_debug|Win32
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_debug|x64.ActiveCfg = console_debug|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_debug|x64.Build.0 = console_debug|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release|Win32.ActiveCfg = console_release|Win32
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release|Win32.Build.0 = console_release|Win32
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release|x64.ActiveCfg = console_release|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release|x64.Build.0 = console_release|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|x64.Build.0 = Debug|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Release|Win32.Build.0 = Release|Win32
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Release|x64.ActiveCfg = Release|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Release|x64.Build.0 = Release|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.release64|Win32.ActiveCfg = release64|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.release64|Win32.Build.0 = release64|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.release64|x64.ActiveCfg = release64|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.release64|x64.Build.0 = release64|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
AMDCaProjectFile = D:\Spice_general\ng-spice-rework\visualc\CodeAnalyst\vngspice.caw
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vngspice", "vngspice.vcproj", "{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
console_debug|Win32 = console_debug|Win32
|
||||
console_debug|x64 = console_debug|x64
|
||||
console_release|Win32 = console_release|Win32
|
||||
console_release|x64 = console_release|x64
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
release64|Win32 = release64|Win32
|
||||
release64|x64 = release64|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_debug|Win32.ActiveCfg = console_debug|Win32
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_debug|Win32.Build.0 = console_debug|Win32
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_debug|x64.ActiveCfg = console_debug|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_debug|x64.Build.0 = console_debug|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release|Win32.ActiveCfg = console_release|Win32
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release|Win32.Build.0 = console_release|Win32
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release|x64.ActiveCfg = console_release|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release|x64.Build.0 = console_release|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|x64.Build.0 = Debug|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Release|Win32.Build.0 = Release|Win32
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Release|x64.ActiveCfg = Release|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Release|x64.Build.0 = Release|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.release64|Win32.ActiveCfg = release64|Win32
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.release64|Win32.Build.0 = release64|Win32
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.release64|x64.ActiveCfg = release64|x64
|
||||
{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.release64|x64.Build.0 = release64|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
|||
|
|
@ -842,7 +842,7 @@
|
|||
FavorSizeOrSpeed="1"
|
||||
WholeProgramOptimization="true"
|
||||
AdditionalIncludeDirectories=""$(ProjectDir)..\src\maths\poly";"$(ProjectDir)..\src\frontend";"$(ProjectDir)..\src\spicelib\devices";"$(ProjectDir)..\src\include";"$(ProjectDir)include""
|
||||
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;SIMULATOR"
|
||||
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;SIMULATOR,PSAPI_VERSION=1"
|
||||
WarningLevel="3"
|
||||
CompileAs="1"
|
||||
/>
|
||||
|
|
@ -857,6 +857,8 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Psapi.lib"
|
||||
LinkTimeCodeGeneration="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
|
|
@ -1803,11 +1805,11 @@
|
|||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\include\grid.h"
|
||||
RelativePath="..\src\frontend\plotting\grid.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\frontend\plotting\grid.h"
|
||||
RelativePath="..\src\include\grid.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
|
@ -1915,11 +1917,11 @@
|
|||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\frontend\inp.h"
|
||||
RelativePath="..\src\spicelib\parser\inp.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\spicelib\parser\inp.h"
|
||||
RelativePath="..\src\frontend\inp.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
|
@ -1946,6 +1948,10 @@
|
|||
RelativePath="..\src\spicelib\parser\inppas3.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\spicelib\parser\inpptree-parser.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\include\inpptree.h"
|
||||
>
|
||||
|
|
|
|||
Loading…
Reference in New Issue