winlin

fix the log for mmap.

@@ -642,11 +642,12 @@ int SrsServer::initialize_st() @@ -642,11 +642,12 @@ int SrsServer::initialize_st()
642 // @remark, st alloc segment use mmap, which only support 32757 threads, 642 // @remark, st alloc segment use mmap, which only support 32757 threads,
643 // if need to support more, for instance, 100k threads, define the macro MALLOC_STACK. 643 // if need to support more, for instance, 100k threads, define the macro MALLOC_STACK.
644 // TODO: FIXME: maybe can use "sysctl vm.max_map_count" to refine. 644 // TODO: FIXME: maybe can use "sysctl vm.max_map_count" to refine.
645 - if (_srs_config->get_max_connections() > 32756) { 645 + #define __MMAP_MAX_CONNECTIONS 32756
  646 + if (_srs_config->get_max_connections() > __MMAP_MAX_CONNECTIONS) {
646 ret = ERROR_ST_EXCEED_THREADS; 647 ret = ERROR_ST_EXCEED_THREADS;
647 srs_error("st mmap for stack allocation must <= %d threads, " 648 srs_error("st mmap for stack allocation must <= %d threads, "
648 "@see Makefile of st for MALLOC_STACK, please build st manually by " 649 "@see Makefile of st for MALLOC_STACK, please build st manually by "
649 - "\"make EXTRA_CFLAGS=-DMALLOC_STACK linux-debug\", ret=%d", ret); 650 + "\"make EXTRA_CFLAGS=-DMALLOC_STACK linux-debug\", ret=%d", __MMAP_MAX_CONNECTIONS, ret);
650 return ret; 651 return ret;
651 } 652 }
652 653