vm: replace phys avl by array

. make vm be able to use malloc() by overriding brk()
   and minix_mmap() functions
 . phys regions can then be malloc()ed and free()d instead
   of being in an avl tree, which is slightly faster
 . 'offset' field in phys_region can go too (offset is implied
   by position in array) but leads to bigger code changes
This commit is contained in:
Ben Gras
2012-12-17 18:26:52 +00:00
parent cee2d9a296
commit 29edcad310
15 changed files with 262 additions and 246 deletions

View File

@@ -95,6 +95,13 @@ void utrace(struct ut *, int);
# define _MALLOC_UNLOCK() if (__isthreaded) _SPINUNLOCK(&thread_lock);
#endif /* __FreeBSD__ */
/* #undef these things so that malloc uses the non-internal symbols.
* This is necessary for VM to be able to define its own versions, and
* use this malloc.
*/
#undef minix_mmap
#undef minix_munmap
#include <assert.h>
#include <sys/types.h>