am d0944d9e: Merge "Re-add dlmalloc for 32 bit."
				
					
				
			* commit 'd0944d9ed38be0d74c3d8876f0f36b9ddc0ce38c': Re-add dlmalloc for 32 bit.
This commit is contained in:
		@@ -34,11 +34,14 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#define malloc_getpagesize getpagesize()
 | 
					#define malloc_getpagesize getpagesize()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* dlmalloc_usable_size was exposed in the NDK, so change the name
 | 
					 | 
				
			||||||
 * of the function on 32 bit architectures.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
#if !defined(__LP64__)
 | 
					#if !defined(__LP64__)
 | 
				
			||||||
 | 
					/* dlmalloc_usable_size and dlmalloc were exposed in the NDK and some
 | 
				
			||||||
 | 
					 * apps actually used them. Rename these functions out of the way
 | 
				
			||||||
 | 
					 * for 32 bit architectures so that ndk_cruft.cpp can expose
 | 
				
			||||||
 | 
					 * compatibility shims with these names.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
#define dlmalloc_usable_size dlmalloc_usable_size_real
 | 
					#define dlmalloc_usable_size dlmalloc_usable_size_real
 | 
				
			||||||
 | 
					#define dlmalloc dlmalloc_real
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Export two symbols used by the VM. */
 | 
					/* Export two symbols used by the VM. */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -325,4 +325,10 @@ extern "C" pid_t __pthread_gettid(pthread_t t) {
 | 
				
			|||||||
  return pthread_gettid_np(t);
 | 
					  return pthread_gettid_np(t);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Older versions of appportable used dlmalloc directly instead of malloc,
 | 
				
			||||||
 | 
					// so export this compatibility shim that simply calls malloc.
 | 
				
			||||||
 | 
					extern "C" void* dlmalloc(size_t size) {
 | 
				
			||||||
 | 
					  return malloc(size);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user