aboutsummaryrefslogtreecommitdiff
path: root/include/apos
diff options
context:
space:
mode:
Diffstat (limited to 'include/apos')
-rw-r--r--include/apos/tcb.h1
-rw-r--r--include/apos/vmem.h11
2 files changed, 5 insertions, 7 deletions
diff --git a/include/apos/tcb.h b/include/apos/tcb.h
index 9cef386..f987b43 100644
--- a/include/apos/tcb.h
+++ b/include/apos/tcb.h
@@ -23,6 +23,7 @@ struct tcb {
id_t tid;
vm_t stack;
+ vm_t heap;
vm_t bin;
struct vm_branch_t *b_r;
diff --git a/include/apos/vmem.h b/include/apos/vmem.h
index 2f6b10c..6918ba4 100644
--- a/include/apos/vmem.h
+++ b/include/apos/vmem.h
@@ -28,15 +28,12 @@ struct sp_mem {
#define __va(x) (((char *)(x)) + VM_DMAP - RAM_BASE)
#define __pa(x) (((char *)(x)) + RAM_BASE - VM_DMAP)
+#define __page(x) ((x) / BASE_PAGE_SIZE)
+#define __addr(x) ((x) * BASE_PAGE_SIZE)
/* general overview of the different functions:
- * (un)map_vmem: map one known page of physical memory to one known page of
- * virtual memory
- *
- * (un)map_vregion: map known physical region to unknown virtual region within
- * start and end
- *
- * (un)map_vsize: map unknown physical region to unknown virtual region
+ * internally they all work with pages, but they are called and return usable
+ * addresses, though within page bounds of course.
*/
/* defined by arch */