Mono GC max-heap-size isn't documented. Is it safe to use in production?

后端 未结 2 637
半阙折子戏
半阙折子戏 2021-02-11 02:46

I need to set an upper bound to the memory used by Mono.

According to blogs it\'s possible to use the parameter max-heap-size to cap the memory usage. Accor

2条回答
  •  野的像风
    2021-02-11 03:23

    It is documented in the mono man page :

    Sets the maximum size of the heap. The size is specified in bytes and must be a power of two. The suffixes k',m' and `g' can be used to specify kilo-, mega- and gigabytes, respectively. The limit is the sum of the nursery, major heap and large object heap. Once the limit is reached the application will receive OutOfMemoryExceptions when trying to allocate. Not the full extent of memory set in max-heap-size could be available to satisfy a single allocation due to internal fragmentation. By default heap limits is disabled and the GC will try to use all available memory.

提交回复
热议问题