mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
fix the log for mmap.
This commit is contained in:
parent
214eda745d
commit
8db25a0bf5
1 changed files with 3 additions and 2 deletions
|
@ -642,11 +642,12 @@ int SrsServer::initialize_st()
|
|||
// @remark, st alloc segment use mmap, which only support 32757 threads,
|
||||
// if need to support more, for instance, 100k threads, define the macro MALLOC_STACK.
|
||||
// TODO: FIXME: maybe can use "sysctl vm.max_map_count" to refine.
|
||||
if (_srs_config->get_max_connections() > 32756) {
|
||||
#define __MMAP_MAX_CONNECTIONS 32756
|
||||
if (_srs_config->get_max_connections() > __MMAP_MAX_CONNECTIONS) {
|
||||
ret = ERROR_ST_EXCEED_THREADS;
|
||||
srs_error("st mmap for stack allocation must <= %d threads, "
|
||||
"@see Makefile of st for MALLOC_STACK, please build st manually by "
|
||||
"\"make EXTRA_CFLAGS=-DMALLOC_STACK linux-debug\", ret=%d", ret);
|
||||
"\"make EXTRA_CFLAGS=-DMALLOC_STACK linux-debug\", ret=%d", __MMAP_MAX_CONNECTIONS, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue