diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-06 18:14:04 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-06 18:14:04 +0300 |
| commit | 76517486919657ecadda9867125dc6730f29a5b7 (patch) | |
| tree | 02d975db2b911ec7b92c4b1be7c5a2510b418ae1 /src/elf.c | |
| parent | 608f44306a6f0d5692f5c81bcbfe7a621ec254ba (diff) | |
| download | kmi-76517486919657ecadda9867125dc6730f29a5b7.tar.gz kmi-76517486919657ecadda9867125dc6730f29a5b7.zip | |
pretty massive virtual memory rewrite
+ The system is now a bit simpler and hopefully easier to understand, while also
extending the shared memory to be 1:N, where there is one owner who
may become a zombie while waiting for the N to die.
Diffstat (limited to 'src/elf.c')
| -rw-r--r-- | src/elf.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -65,15 +65,15 @@ static void __map_exec(struct tcb *t, vm_t bin, uint8_t ei_c, vm_t phstart, vm_t va = program_header_prop(ei_c, runner, p_vaddr); size_t vsz = program_header_prop(ei_c, runner, p_memsz); - vm_t start = alloc_fixed_region(&t->sp_r, va, vsz, &vsz, - default_flags); + vm_t start = alloc_fixed_uvmem(t, va, vsz, default_flags); if (!start) return; /* out of memory or something */ uint8_t elf_flags = program_header_prop(ei_c, runner, p_flags); uint8_t uvflags = __elf_to_uvflags(elf_flags); - map_allocd_region(t->proc.vmem, start, vsz, default_flags, 0); + map_region(t->proc.vmem, start, vsz, max_order(), + default_flags); memset((void *)start, 0, vsz); vm_t vo = bin + program_header_prop(ei_c, runner, p_offset); |
