libexec: mmap support, prealloc variants
In libexec, split the memory allocation method into cleared and non-cleared. Cleared gives zeroed memory, non-cleared gives 'junk' memory (that will be overwritten anyway, and so needn't be cleared) that is faster to get. Also introduce the 'memmap' method that can be used, if available, to map code and data from executables into a process using the third-party mmap() mode. Change-Id: I26694fd3c21deb8b97e01ed675dfc14719b0672b
This commit is contained in:
@@ -287,7 +287,8 @@ void exec_bootproc(struct vmproc *vmp, struct boot_image *ip)
|
||||
execi->copymem = libexec_copy_physcopy;
|
||||
execi->clearproc = NULL;
|
||||
execi->clearmem = libexec_clear_sys_memset;
|
||||
execi->allocmem_prealloc = libexec_alloc_vm_prealloc;
|
||||
execi->allocmem_prealloc_junk = libexec_alloc_vm_prealloc;
|
||||
execi->allocmem_prealloc_cleared = libexec_alloc_vm_prealloc;
|
||||
execi->allocmem_ondemand = libexec_alloc_vm_ondemand;
|
||||
|
||||
if(libexec_load_elf(execi) != OK)
|
||||
|
||||
Reference in New Issue
Block a user