1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

add sysctl vm.max_map_count for mmap.

This commit is contained in:
winlin 2014-08-27 13:47:56 +08:00
parent d0c585af86
commit 53011808fb

View file

@ -554,6 +554,7 @@ 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) {
ret = ERROR_ST_EXCEED_THREADS;
srs_error("st mmap for stack allocation must <= %d threads, "