diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index 7a82a17d0b864a556d5584e55cf7b87d51517ed7..10cdc7087b3395a121c4b49a41988e63cc67ade8 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -635,7 +635,8 @@ U32 LLMemoryInfo::getPhysicalMemoryClamped() const
 	}
 }
 
-void LLMemoryInfo::getAvailableMemoryKB(U32& avail_physical_mem_kb, U32& avail_virtual_mem_kb) const
+//static
+void LLMemoryInfo::getAvailableMemoryKB(U32& avail_physical_mem_kb, U32& avail_virtual_mem_kb)
 {
 #if LL_WINDOWS
 	MEMORYSTATUSEX state;
diff --git a/indra/llcommon/llsys.h b/indra/llcommon/llsys.h
index 35425f38ed1ab006dfca8b9b1a55c81aa17db103..41a4f2500064eed2cda8e289b1d986f8d202b7c5 100644
--- a/indra/llcommon/llsys.h
+++ b/indra/llcommon/llsys.h
@@ -116,7 +116,7 @@ public:
 	U32 getPhysicalMemoryClamped() const; ///< Memory size in clamped bytes
 
 	//get the available memory infomation in KiloBytes.
-	void getAvailableMemoryKB(U32& avail_physical_mem_kb, U32& avail_virtual_mem_kb) const;
+	static void getAvailableMemoryKB(U32& avail_physical_mem_kb, U32& avail_virtual_mem_kb);
 };
 
 
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index fd5136e58bf48a19ad1a7a810cca01e392d5af65..02160b09c4fcc21ca644fb2da60d182c791d9d7f 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -27,7 +27,7 @@
 #include "linden_common.h"
 
 #include <boost/static_assert.hpp>
-
+#include "llsys.h"
 #include "llvertexbuffer.h"
 // #include "llrender.h"
 #include "llglheaders.h"
@@ -856,6 +856,12 @@ U8* LLVertexBuffer::mapBuffer(S32 access)
 		{
 			log_glerror();
 
+			//check the availability of memory
+			U32 avail_phy_mem, avail_vir_mem;
+			LLMemoryInfo::getAvailableMemoryKB(avail_phy_mem, avail_vir_mem) ;
+			llinfos << "Available physical mwmory(KB): " << avail_phy_mem << llendl ; 
+			llinfos << "Available virtual memory(KB): " << avail_vir_mem << llendl;
+
 			//--------------------
 			//print out more debug info before crash
 			llinfos << "vertex buffer size: (num verts : num indices) = " << getNumVerts() << " : " << getNumIndices() << llendl ;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index f6cff3d4436682b22a56b6d3934c80b5e35caa8c..3a98749c0f941d01028d81e14c89426cb2933b3a 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1012,7 +1012,7 @@ bool LLAppViewer::mainLoop()
 				memCheckTimer.reset() ;
 
 				//update the availability of memory
-				gSysMemory.getAvailableMemoryKB(mAvailPhysicalMemInKB, mAvailVirtualMemInKB) ;
+				LLMemoryInfo::getAvailableMemoryKB(mAvailPhysicalMemInKB, mAvailVirtualMemInKB) ;
 			}
 			llcallstacks << "Available physical mem(KB): " << mAvailPhysicalMemInKB << llcallstacksendl ;
 			llcallstacks << "Available virtual mem(KB): " << mAvailVirtualMemInKB << llcallstacksendl ;
@@ -1252,7 +1252,7 @@ bool LLAppViewer::mainLoop()
 				llinfos << "Availabe physical memory(KB) at the beginning of the frame: " << mAvailPhysicalMemInKB << llendl ;
 				llinfos << "Availabe virtual memory(KB) at the beginning of the frame: " << mAvailVirtualMemInKB << llendl ;
 
-				gSysMemory.getAvailableMemoryKB(mAvailPhysicalMemInKB, mAvailVirtualMemInKB) ;
+				LLMemoryInfo::getAvailableMemoryKB(mAvailPhysicalMemInKB, mAvailVirtualMemInKB) ;
 
 				llinfos << "Current availabe physical memory(KB): " << mAvailPhysicalMemInKB << llendl ;
 				llinfos << "Current availabe virtual memory(KB): " << mAvailVirtualMemInKB << llendl ;