我一直在試圖讓我的C#遊戲的服務器在Linux上運行,除了一個問題之外,它運行良好:垃圾收集器似乎沒有給回任何內存操作系統,所以它最終達到極限並崩潰。Linux VPS上的單聲道垃圾回收
我注意到,在釋放大量內存(更改地圖或播放器離開)的操作之後使用System.GC.Collect可防止OutOfMemoryError,但它仍然使用大約30MB的可用內存(1GB)在嘗試分配較小的內存量時可能會崩潰。
我不認爲這是內存泄漏,因爲在Windows上它有一個播放器在線時最多使用60MB,但是一個人重複連接和斷開連接足以耗盡Linux上的所有內存服務器。
單--version:
Mono JIT compiler version 2.10.8 (tarball Mon Feb 25 19:25:00 MSK 2013)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)
操作系統是CentOS的,而VPS平臺的OpenVZ。
你應該分享你的單聲道版本信息(單聲道 - 版本) – TheNextman 2013-02-26 18:53:55
我將它添加到問題中。 – phpscriptcoder 2013-02-26 19:09:59