malloc build fixes
This commit is contained in:
		
							parent
							
								
									e81a0fd9c1
								
							
						
					
					
						commit
						195190912f
					
				@ -126,7 +126,11 @@ static struct block *block_alloc(size_t size)
 | 
			
		||||
	assert(ptr_min < ptr_max);
 | 
			
		||||
 | 
			
		||||
	/* select address at random */
 | 
			
		||||
#ifdef __NBSD_LIBC
 | 
			
		||||
	tsc = 0;
 | 
			
		||||
#else
 | 
			
		||||
	read_tsc_64(&tsc);
 | 
			
		||||
#endif
 | 
			
		||||
	totalsize = block_get_totalsize(size);
 | 
			
		||||
	page_index_max = (ptr_max - ptr_min - totalsize) / PAGE_SIZE;
 | 
			
		||||
	page_index = (page_index_max > 0) ? (ex64lo(tsc) % page_index_max) : 0;
 | 
			
		||||
 | 
			
		||||
@ -44,9 +44,9 @@ SRCS+= erand48_ieee754.c
 | 
			
		||||
SRCS+=	jemalloc.c
 | 
			
		||||
.elif (${USE_MINIXMALLOC} != "no")
 | 
			
		||||
SRCS+=	\
 | 
			
		||||
	${LIBCDIR}/../libc/stdlib/malloc.c	\
 | 
			
		||||
	${LIBCDIR}/../libc/stdlib/calloc.c	\
 | 
			
		||||
	${LIBCDIR}/../libc/stdlib/malloc-debug.c
 | 
			
		||||
	${LIBCDIR}/../libc/ansi/malloc.c	\
 | 
			
		||||
	${LIBCDIR}/../libc/ansi/calloc.c	\
 | 
			
		||||
	${LIBCDIR}/../libc/ansi/malloc-debug.c
 | 
			
		||||
.else
 | 
			
		||||
SRCS+=	malloc.c
 | 
			
		||||
.endif
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user