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:
@@ -138,7 +138,8 @@ void arch_boot_proc(struct boot_image *ip, struct proc *rp)
|
||||
/* callbacks for use in the kernel */
|
||||
execi.copymem = libexec_copy_memcpy;
|
||||
execi.clearmem = libexec_clear_memset;
|
||||
execi.allocmem_prealloc = libexec_pg_alloc;
|
||||
execi.allocmem_prealloc_cleared = libexec_pg_alloc;
|
||||
execi.allocmem_prealloc_junk = libexec_pg_alloc;
|
||||
execi.allocmem_ondemand = libexec_pg_alloc;
|
||||
execi.clearproc = NULL;
|
||||
|
||||
|
||||
@@ -414,7 +414,8 @@ void arch_boot_proc(struct boot_image *ip, struct proc *rp)
|
||||
/* callbacks for use in the kernel */
|
||||
execi.copymem = libexec_copy_memcpy;
|
||||
execi.clearmem = libexec_clear_memset;
|
||||
execi.allocmem_prealloc = libexec_pg_alloc;
|
||||
execi.allocmem_prealloc_junk = libexec_pg_alloc;
|
||||
execi.allocmem_prealloc_cleared = libexec_pg_alloc;
|
||||
execi.allocmem_ondemand = libexec_pg_alloc;
|
||||
execi.clearproc = NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user