winlin

add sysctl vm.max_map_count for mmap.

@@ -554,6 +554,7 @@ int SrsServer::initialize_st() @@ -554,6 +554,7 @@ int SrsServer::initialize_st()
554 554
555 // @remark, st alloc segment use mmap, which only support 32757 threads, 555 // @remark, st alloc segment use mmap, which only support 32757 threads,
556 // if need to support more, for instance, 100k threads, define the macro MALLOC_STACK. 556 // if need to support more, for instance, 100k threads, define the macro MALLOC_STACK.
  557 + // TODO: FIXME: maybe can use "sysctl vm.max_map_count" to refine.
557 if (_srs_config->get_max_connections() > 32756) { 558 if (_srs_config->get_max_connections() > 32756) {
558 ret = ERROR_ST_EXCEED_THREADS; 559 ret = ERROR_ST_EXCEED_THREADS;
559 srs_error("st mmap for stack allocation must <= %d threads, " 560 srs_error("st mmap for stack allocation must <= %d threads, "