git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4574 0c269be4-1314-0410-8aa9-9f06e86f4224tags/1.9.8
| @@ -900,6 +900,9 @@ jackctl_server_open( | |||||
| jack_cleanup_shm(); | jack_cleanup_shm(); | ||||
| JackTools::CleanupFiles(server_ptr->name.str); | JackTools::CleanupFiles(server_ptr->name.str); | ||||
| // OS specific initialisations | |||||
| JackTools::InitOS(); | |||||
| if (!server_ptr->realtime.b && server_ptr->client_timeout.i == 0) { | if (!server_ptr->realtime.b && server_ptr->client_timeout.i == 0) { | ||||
| server_ptr->client_timeout.i = 500; /* 0.5 sec; usable when non realtime. */ | server_ptr->client_timeout.i = 500; /* 0.5 sec; usable when non realtime. */ | ||||
| } | } | ||||
| @@ -43,11 +43,11 @@ namespace Jack { | |||||
| #endif | #endif | ||||
| } | } | ||||
| void JackTools::ThrowJackNetException() | |||||
| void JackTools::ThrowJackNetException() | |||||
| { | { | ||||
| throw JackNetException(); | throw JackNetException(); | ||||
| } | } | ||||
| int JackTools::MkDir(const char* path) | int JackTools::MkDir(const char* path) | ||||
| { | { | ||||
| #ifdef WIN32 | #ifdef WIN32 | ||||
| @@ -237,6 +237,21 @@ namespace Jack { | |||||
| new_name[i] = '\0'; | new_name[i] = '\0'; | ||||
| } | } | ||||
| void JackTools::InitOS() | |||||
| { | |||||
| #ifdef WIN32 | |||||
| SIZE_T dwMin, dwMax; | |||||
| HANDLE hProcess = GetCurrentProcess(); | |||||
| if (!GetProcessWorkingSetSize(hProcess, &dwMin, &dwMax)) { | |||||
| jack_error("GetProcessWorkingSetSize failed (%d)", GetLastError()); | |||||
| } else if (!SetProcessWorkingSetSize(hProcess, dwMin, dwMax * 5)) { | |||||
| jack_error("SetProcessWorkingSetSize failed (%d)", GetLastError()); | |||||
| } else { | |||||
| jack_info("SetProcessWorkingSetSize min = %d max = %d", dwMin, dwMax * 5); | |||||
| } | |||||
| #endif | |||||
| } | |||||
| #ifdef WIN32 | #ifdef WIN32 | ||||
| void BuildClientPath(char* path_to_so, int path_len, const char* so_name) | void BuildClientPath(char* path_to_so, int path_len, const char* so_name) | ||||
| @@ -63,11 +63,13 @@ namespace Jack | |||||
| static int MkDir(const char* path); | static int MkDir(const char* path); | ||||
| static char* UserDir(); | static char* UserDir(); | ||||
| static char* ServerDir ( const char* server_name, char* server_dir ); | |||||
| static char* ServerDir(const char* server_name, char* server_dir); | |||||
| static const char* DefaultServerName(); | static const char* DefaultServerName(); | ||||
| static void CleanupFiles ( const char* server_name ); | |||||
| static void CleanupFiles(const char* server_name); | |||||
| static int GetTmpdir(); | static int GetTmpdir(); | ||||
| static void RewriteName ( const char* name, char* new_name ); | |||||
| static void RewriteName(const char* name, char* new_name); | |||||
| static void InitOS(); | |||||
| static void ThrowJackNetException(); | static void ThrowJackNetException(); | ||||