mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +00:00 
			
		
		
		
	git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2950 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			17 lines
		
	
	
		
			465 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			465 B
		
	
	
	
		
			C
		
	
	
	
	
	
| //===-- memory.c - String functions for the LLVM libc Library ----*- C -*-===//
 | |
| // 
 | |
| // A lot of this code is ripped gratuitously from glibc and libiberty.
 | |
| //
 | |
| //===----------------------------------------------------------------------===//
 | |
| 
 | |
| #include <stdlib.h>
 | |
| 
 | |
| void *malloc(size_t);
 | |
| void free(void *);
 | |
| void *memset(void *, int, size_t);
 | |
| 
 | |
| void *calloc(size_t nelem, size_t elsize) {
 | |
|   void *Result = malloc(nelem*elsize);
 | |
|   return memset(Result, 0, nelem*elsize);
 | |
| }
 |