mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 03:41:55 +00:00
Merge SRS3.0
This commit is contained in:
commit
365d3b8bda
5 changed files with 5 additions and 14 deletions
|
@ -202,6 +202,7 @@ For previous versions, please read:
|
|||
|
||||
## V3 changes
|
||||
|
||||
* v3.0, 2020-10-31, Fix [#509][bug #509], Always malloc stack on heap. 3.0.153
|
||||
* v3.0, 2020-10-31, Remove some global elements for debugging. 3.0.152
|
||||
* v3.0, 2020-10-31, Use global _srs_server for debugging. 3.0.151
|
||||
* v3.0, 2020-10-31, Refine source cid, track previous one. 3.0.150
|
||||
|
|
2
trunk/.gitignore
vendored
2
trunk/.gitignore
vendored
|
@ -44,4 +44,4 @@ srs
|
|||
/configure.sh
|
||||
/janus
|
||||
*.dump
|
||||
|
||||
bug
|
||||
|
|
|
@ -347,6 +347,8 @@ else
|
|||
echo "Build ST without UDP sendmmsg support."
|
||||
_ST_EXTRA_CFLAGS="$_ST_EXTRA_CFLAGS -UMD_HAVE_SENDMMSG -U_GNU_SOURCE"
|
||||
fi
|
||||
# Always alloc on heap, @see https://github.com/ossrs/srs/issues/509#issuecomment-719931676
|
||||
_ST_EXTRA_CFLAGS="$_ST_EXTRA_CFLAGS -DMALLOC_STACK"
|
||||
# Pass the global extra flags.
|
||||
if [[ $SRS_EXTRA_FLAGS != '' ]]; then
|
||||
_ST_EXTRA_CFLAGS="$_ST_EXTRA_CFLAGS $SRS_EXTRA_FLAGS"
|
||||
|
|
|
@ -803,18 +803,6 @@ srs_error_t SrsServer::initialize_st()
|
|||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
// @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.
|
||||
#define __MMAP_MAX_CONNECTIONS 32756
|
||||
if (_srs_config->get_max_connections() > __MMAP_MAX_CONNECTIONS) {
|
||||
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\"", __MMAP_MAX_CONNECTIONS);
|
||||
return srs_error_new(ERROR_ST_EXCEED_THREADS, "%d exceed max %d threads",
|
||||
_srs_config->get_max_connections(), __MMAP_MAX_CONNECTIONS);
|
||||
}
|
||||
|
||||
// check asprocess.
|
||||
bool asprocess = _srs_config->get_asprocess();
|
||||
if (asprocess && ppid == 1) {
|
||||
|
|
|
@ -24,6 +24,6 @@
|
|||
#ifndef SRS_CORE_VERSION3_HPP
|
||||
#define SRS_CORE_VERSION3_HPP
|
||||
|
||||
#define SRS_VERSION3_REVISION 152
|
||||
#define SRS_VERSION3_REVISION 153
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue