Scott Lawrence avatar Scott Lawrence committed 524da90 Merge

merge changes for DRTVWR-227

Comments (0)

Files changed (2)

 28e100d0379a2b0710c57647a28fc5239d3d7b99 3.3.4-release
 005dfe5c4c377207d065fb27858d2eb0b53b143a DRTVWR-167
 888768f162d2c0a8de1dcc5fb9a08bd8bd120a6b DRTVWR-175
-4ad8a3afe40e0200309e3ada68932c4295ac2795 DRTVWR-179
 a8b3eca451a9eaab59987efb0ab1c4217e3f2dcc DRTVWR-182
 1f27cdfdc54246484f8afbbe42ce48e954175cbd 3.4.0-beta1
 9ee9387789701d597130f879d9011a4958753862 DRTVWR-189
 dd23d4da3bcb2ffda58569e759feb7c119982973 DRTVWR-224
 0bd3744ff060452aa13ff4992eafb381df7b1012 3.4.1-beta5
 29075f8c1abed53dcf195a59f61744e27a91108f DRTVWR-226
-4ad8a3afe40e0200309e3ada68932c4295ac2795 DRTVWR-179
 fba99f381b8d4ad1b7b42fa4993b29998d95be18 DRTVWR-179
 49ed253c80bed7410e238eeab35a9f14cb034364 3.4.1-beta6
+468ca3268229011a59df99229b24315844b33d34 DRTVWR-227

indra/llcommon/llmemory.cpp

 	return sAllocatedMemInKB ;
 }
 
-void* ll_allocate (size_t size)
-{
-	if (size == 0)
-	{
-		llwarns << "Null allocation" << llendl;
-	}
-	void *p = malloc(size);
-	if (p == NULL)
-	{
-		LLMemory::freeReserve();
-		llerrs << "Out of memory Error" << llendl;
-	}
-	return p;
-}
-
 //----------------------------------------------------------------------------
 
 #if defined(LL_WINDOWS)
 	//if the asked size larger than MAX_BLOCK_SIZE, fetch from heap directly, the pool does not manage it
 	if(size >= CHUNK_SIZE)
 	{
-		return (char*)malloc(size) ;
+		return (char*)ll_aligned_malloc_16(size) ;
 	}
 
 	char* p = NULL ;
 			to_log = false ;
 		}
 
-		return (char*)malloc(size) ;
+		return (char*)ll_aligned_malloc_16(size) ;
 	}
 
 	return p ;
 	
 	if(!chunk)
 	{
-		free(addr) ; //release from heap
+		ll_aligned_free_16(addr) ; //release from heap
 	}
 	else
 	{
 
 	mReservedPoolSize += preferred_size + overhead ;
 
-	char* buffer = (char*)malloc(preferred_size + overhead) ;
+	char* buffer = (char*)ll_aligned_malloc_16(preferred_size + overhead) ;
 	if(!buffer)
 	{
 		return NULL ;
 	mReservedPoolSize -= chunk->getBufferSize() ;
 	
 	//release memory
-	free(chunk->getBuffer()) ;
+	ll_aligned_free_16(chunk->getBuffer()) ;
 }
 
 U16 LLPrivateMemoryPool::findHashKey(const char* addr)
 
 	if(!poolp)
 	{
-		p = (char*)malloc(size) ;
+		p = (char*)ll_aligned_malloc_16(size) ;
 	}
 	else
 	{
 	}
 	else
 	{
-		return (char*)malloc(size) ;
+		return (char*)ll_aligned_malloc_16(size) ;
 	}
 }
 #endif
 	{
 		if(!sPrivatePoolEnabled)
 		{
-			free(addr) ; //private pool is disabled.
+			ll_aligned_free_16(addr) ; //private pool is disabled.
 		}
 		else if(!sInstance) //the private memory manager is destroyed, try the dangling list
 		{
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.