diff --git a/indra/llcommon/llrefcount.cpp b/indra/llcommon/llrefcount.cpp
index 5cbd3464115ea784952d572bab513d3c8045ea31..6852b5536aecdfebb1627ae218cfcfed26bacc78 100644
--- a/indra/llcommon/llrefcount.cpp
+++ b/indra/llcommon/llrefcount.cpp
@@ -30,7 +30,7 @@
 #include "llerror.h"
 
 // maximum reference count before sounding memory leak alarm
-const S32 gMaxRefCount = 65536;
+const S32 gMaxRefCount = S32_MAX;
 
 LLRefCount::LLRefCount(const LLRefCount& other)
 :	mRef(0)