aboutsummaryrefslogtreecommitdiff
path: root/externals
diff options
context:
space:
mode:
Diffstat (limited to 'externals')
-rw-r--r--externals/grill/flext/changes.txt1
-rw-r--r--externals/grill/flext/flext.vcproj24
-rw-r--r--externals/grill/flext/source/flsupport.cpp7
-rw-r--r--externals/grill/flext/source/flsupport.h10
4 files changed, 24 insertions, 18 deletions
diff --git a/externals/grill/flext/changes.txt b/externals/grill/flext/changes.txt
index 19610f05..52f12ed8 100644
--- a/externals/grill/flext/changes.txt
+++ b/externals/grill/flext/changes.txt
@@ -30,6 +30,7 @@ Version history:
- ListAttributes (or the getattributes message) now lists attributes in the order they were created (first class, then object scope)
- enforcing usage of STL
- explicit boolean attributes (great for attribute editor layout!)
+- added flext::NewLarge and flext::FreeLarge memory allocation functions which use the C-Library heap and should mainly be used in secondary threads
0.4.4:
- fixed deadly bug for Max/MSP method-to-symbol-binding proxies
diff --git a/externals/grill/flext/flext.vcproj b/externals/grill/flext/flext.vcproj
index 3cf80ec3..158ff23d 100644
--- a/externals/grill/flext/flext.vcproj
+++ b/externals/grill/flext/flext.vcproj
@@ -415,7 +415,7 @@
FavorSizeOrSpeed="0"
EnableFiberSafeOptimizations="FALSE"
AdditionalIncludeDirectories="f:\prog\pd\pd-cvs\src,f:\prog\packs\pthreads,f:\prog\audio\sndobj\include,f:\prog\audio\stk\include"
- PreprocessorDefinitions="WIN32;_LIB;FLEXT_SYS_PD;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_SHARED;FLEXT_EXPORTS;FLEXT_PDLOCK"
+ PreprocessorDefinitions="WIN32;_LIB;FLEXT_SYS_PD;FLEXT_USE_SIMD;FLEXT_SHARED;FLEXT_EXPORTS;FLEXT_PDLOCK"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableEnhancedInstructionSet="1"
@@ -482,7 +482,7 @@ copy F:\prog\max\flext\pd-msvc\flext.dll f:\prog\dll
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="F:\prog\audio\MaxWinSDK\c74support\max-includes,F:\prog\audio\MaxWinSDK\c74support\msp-includes,f:\prog\packs\pthreads,f:\prog\audio\sndobj\include,f:\prog\audio\stk\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS_MAX;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_SHARED;FLEXT_EXPORTS"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS_MAX;FLEXT_USE_SIMD;FLEXT_SHARED;FLEXT_EXPORTS"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeTypeInfo="TRUE"
@@ -512,7 +512,7 @@ copy F:\prog\max\flext\pd-msvc\flext.dll f:\prog\dll
<Tool
Name="VCPostBuildEventTool"
Description="copy flext to maestra"
- CommandLine="copy F:\prog\max\flext\pd-msvc\flext_d.dll f:\prog\maestra\dev\debug"/>
+ CommandLine="copy F:\prog\max\flext\max-msvc\flext_d.max.dll f:\prog\maestra\dev\debug"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
@@ -580,8 +580,8 @@ copy F:\prog\max\flext\pd-msvc\flext.dll f:\prog\dll
Name="VCPostBuildEventTool"
Description="copy flext to maestra"
CommandLine="copy F:\prog\max\flext\source\*.h f:\prog\maestra\dev\api\include
-copy F:\prog\max\flext\pd-msvc\flext_l.lib f:\prog\maestra\dev\api\lib
-copy F:\prog\max\flext\pd-msvc\flext.dll f:\prog\maestra\dev\release
+copy F:\prog\max\flext\max-msvc\flext_l.lib f:\prog\maestra\dev\api\lib
+copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\maestra\dev\release
copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll
"/>
<Tool
@@ -644,12 +644,7 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"
- Description="copy flext to maestra"
- CommandLine="copy F:\prog\max\flext\source\*.h f:\prog\maestra\dev\api\include
-copy F:\prog\max\flext\pd-msvc\flext_l.lib f:\prog\maestra\dev\api\lib
-copy F:\prog\max\flext\pd-msvc\flext.dll f:\prog\maestra\dev\release
-copy F:\prog\max\flext\pd-msvc\flext.dll f:\prog\dll
-"/>
+ Description="copy flext to maestra"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
@@ -709,12 +704,7 @@ copy F:\prog\max\flext\pd-msvc\flext.dll f:\prog\dll
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"
- Description="copy flext to maestra"
- CommandLine="copy F:\prog\max\flext\source\*.h f:\prog\maestra\dev\api\include
-copy F:\prog\max\flext\pd-msvc\flext_l.lib f:\prog\maestra\dev\api\lib
-copy F:\prog\max\flext\pd-msvc\flext.dll f:\prog\maestra\dev\release
-copy F:\prog\max\flext\pd-msvc\flext.dll f:\prog\dll
-"/>
+ Description="copy flext to maestra"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
diff --git a/externals/grill/flext/source/flsupport.cpp b/externals/grill/flext/source/flsupport.cpp
index b27196b8..eca73d90 100644
--- a/externals/grill/flext/source/flsupport.cpp
+++ b/externals/grill/flext/source/flsupport.cpp
@@ -82,11 +82,18 @@ void flext::Setup()
void *flext::operator new(size_t bytes)
{
bytes += sizeof(size_t);
+
+#ifdef FLEXT_DEBUG
+ if(bytes > 32000)
+ post("flext - warning: excessive memory allocation of %i bytes",bytes);
+#endif
+
#if FLEXT_SYS == FLEXT_SYS_JMAX
char *blk = (char *)::fts_malloc(bytes);
#else
char *blk = (char *)::getbytes(bytes);
#endif
+
*(size_t *)blk = bytes;
return blk+sizeof(size_t);
}
diff --git a/externals/grill/flext/source/flsupport.h b/externals/grill/flext/source/flsupport.h
index f0b3d34f..ac875980 100644
--- a/externals/grill/flext/source/flsupport.h
+++ b/externals/grill/flext/source/flsupport.h
@@ -69,7 +69,8 @@ public:
*/
/*! Overloaded new memory allocation method
- \warning Max/MSP (or MacOS) allows only 16K in overdrive mode!
+ \note this uses a fast allocation method of the real-time system
+ \warning Max/MSP (or MacOS) allows only 32K in overdrive mode!
*/
void *operator new(size_t bytes);
//! Overloaded delete method
@@ -80,6 +81,13 @@ public:
void operator delete[](void *blk) { operator delete(blk); }
#endif
+ /*! Get a large memory block
+ the normal C library function is used here
+ */
+ static void *NewLarge(size_t bytes) { return ::operator new(bytes); }
+ //! Free a large memory block
+ static void FreeLarge(void *blk) { return ::operator delete(blk); }
+
//! Get an aligned memory block
static void *NewAligned(size_t bytes,int bitalign = 128);
//! Free an aligned memory block