mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
Reduced allocated stack sizes. Trims about 13MB of memory consumption.
git-svn-id: svn://localhost/ardour2/trunk@1293 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
5c7a3c680b
commit
2d62ded1aa
5 changed files with 29 additions and 1 deletions
|
|
@ -837,6 +837,8 @@ if env['SYSLIBS']:
|
||||||
# libraries['flowcanvas'] = LibraryInfo(LIBS='flowcanvas', LIBPATH='#/libs/flowcanvas', CPPPATH='#libs/flowcanvas')
|
# libraries['flowcanvas'] = LibraryInfo(LIBS='flowcanvas', LIBPATH='#/libs/flowcanvas', CPPPATH='#libs/flowcanvas')
|
||||||
libraries['soundtouch'] = LibraryInfo()
|
libraries['soundtouch'] = LibraryInfo()
|
||||||
libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs soundtouch-1.0')
|
libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs soundtouch-1.0')
|
||||||
|
# Comment the previous line and uncomment this for Debian:
|
||||||
|
#libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs libSoundTouch')
|
||||||
|
|
||||||
libraries['appleutility'] = LibraryInfo(LIBS='libappleutility',
|
libraries['appleutility'] = LibraryInfo(LIBS='libappleutility',
|
||||||
LIBPATH='#libs/appleutility',
|
LIBPATH='#libs/appleutility',
|
||||||
|
|
|
||||||
|
|
@ -2779,9 +2779,15 @@ Editor::freeze_route ()
|
||||||
itt.done = false;
|
itt.done = false;
|
||||||
itt.cancel = false;
|
itt.cancel = false;
|
||||||
itt.progress = 0.0f;
|
itt.progress = 0.0f;
|
||||||
|
|
||||||
|
pthread_attr_t attr;
|
||||||
|
pthread_attr_init(&attr);
|
||||||
|
pthread_attr_setstacksize(&attr, 500000);
|
||||||
|
|
||||||
pthread_create (&itt.thread, 0, _freeze_thread, this);
|
pthread_create (&itt.thread, 0, _freeze_thread, this);
|
||||||
|
|
||||||
|
pthread_attr_destroy(&attr);
|
||||||
|
|
||||||
track_canvas.get_window()->set_cursor (Gdk::Cursor (Gdk::WATCH));
|
track_canvas.get_window()->set_cursor (Gdk::Cursor (Gdk::WATCH));
|
||||||
|
|
||||||
while (!itt.done && !itt.cancel) {
|
while (!itt.done && !itt.cancel) {
|
||||||
|
|
|
||||||
|
|
@ -399,7 +399,8 @@ void
|
||||||
AudioEngine::start_metering_thread ()
|
AudioEngine::start_metering_thread ()
|
||||||
{
|
{
|
||||||
if (m_meter_thread == 0) {
|
if (m_meter_thread == 0) {
|
||||||
m_meter_thread = Glib::Thread::create (sigc::mem_fun(this, &AudioEngine::meter_thread), true);
|
m_meter_thread = Glib::Thread::create (sigc::mem_fun(this, &AudioEngine::meter_thread),
|
||||||
|
500000, true, true, Glib::THREAD_PRIORITY_NORMAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -199,10 +199,15 @@ OSC::init_osc_thread ()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pthread_attr_t attr;
|
||||||
|
pthread_attr_init(&attr);
|
||||||
|
pthread_attr_setstacksize(&attr, 500000);
|
||||||
|
|
||||||
pthread_create (&_osc_thread, NULL, &OSC::_osc_receiver, this);
|
pthread_create (&_osc_thread, NULL, &OSC::_osc_receiver, this);
|
||||||
if (!_osc_thread) {
|
if (!_osc_thread) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
pthread_attr_destroy(&attr);
|
||||||
|
|
||||||
//pthread_detach (_osc_thread);
|
//pthread_detach (_osc_thread);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,16 @@ pthread_create_and_store (string name, pthread_t *thread, pthread_attr_t *attr,
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
pthread_attr_t default_attr;
|
||||||
|
bool use_default_attr = (attr == NULL);
|
||||||
|
|
||||||
|
if (use_default_attr) {
|
||||||
|
// set default stack size to sensible default for memlocking
|
||||||
|
pthread_attr_init(&default_attr);
|
||||||
|
pthread_attr_setstacksize(&default_attr, 500000);
|
||||||
|
attr = &default_attr;
|
||||||
|
}
|
||||||
|
|
||||||
if ((ret = pthread_create (thread, attr, start_routine, arg)) == 0) {
|
if ((ret = pthread_create (thread, attr, start_routine, arg)) == 0) {
|
||||||
std::pair<string,pthread_t> newpair;
|
std::pair<string,pthread_t> newpair;
|
||||||
newpair.first = name;
|
newpair.first = name;
|
||||||
|
|
@ -53,6 +63,10 @@ pthread_create_and_store (string name, pthread_t *thread, pthread_attr_t *attr,
|
||||||
|
|
||||||
pthread_mutex_unlock (&thread_map_lock);
|
pthread_mutex_unlock (&thread_map_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (use_default_attr) {
|
||||||
|
pthread_attr_destroy(&default_attr);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue