diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-26 23:00:55 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-26 23:00:55 +0300 |
| commit | 3f194f1c7264945a63b0018b159cc83bd9385c59 (patch) | |
| tree | 4d277264e75b197844eae154e96e73d9cd54de3a /include | |
| parent | 1b5a553194f47066d60bb1c9475af1f413af8f4a (diff) | |
| download | kmi-3f194f1c7264945a63b0018b159cc83bd9385c59.tar.gz kmi-3f194f1c7264945a63b0018b159cc83bd9385c59.zip | |
fix memory leaks destroying threads
Diffstat (limited to 'include')
| -rw-r--r-- | include/arch/tcb.h | 2 | ||||
| -rw-r--r-- | include/kmi/regions.h | 4 | ||||
| -rw-r--r-- | include/kmi/vmem.h | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/include/arch/tcb.h b/include/arch/tcb.h index b8b0961..f4726ad 100644 --- a/include/arch/tcb.h +++ b/include/arch/tcb.h @@ -32,7 +32,7 @@ void tcb_assign(struct tcb *t); * * @param t Thread whose RPC stack should be set up. */ -void setup_rpc_stack(struct tcb *t); +stat_t setup_rpc_stack(struct tcb *t); /** * Free memory backing rpc stack. diff --git a/include/kmi/regions.h b/include/kmi/regions.h index e612543..5faec0d 100644 --- a/include/kmi/regions.h +++ b/include/kmi/regions.h @@ -155,6 +155,10 @@ vm_t alloc_shared_region(struct mem_region_root *r, size_t size, size_t *actual_size, vmflags_t flags, id_t pid); +vm_t alloc_shared_fixed_region(struct mem_region_root *r, vm_t start, + size_t size, + size_t *actual_size, vmflags_t flags, id_t pid); + /** * Allocate fixed memory region. * Will allocate region that is at least \c size bytes, and includes \c start. diff --git a/include/kmi/vmem.h b/include/kmi/vmem.h index eb46da5..c53f009 100644 --- a/include/kmi/vmem.h +++ b/include/kmi/vmem.h @@ -129,7 +129,8 @@ void destroy_uvmem(struct tcb *r); * the start of \p base, not necessarily the start of the allocation. * If this should be freed, remember to align down to the base page size. */ -vm_t map_fixed_uvmem(struct tcb *r, pm_t base, size_t size, vmflags_t flags); +vm_t map_shared_fixed_uvmem(struct tcb *r, pm_t base, size_t size, + vmflags_t flags); /** * Clone process memory. |
