diff options
Diffstat (limited to 'src/include/kernel/basesegment.H')
| -rw-r--r-- | src/include/kernel/basesegment.H | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/kernel/basesegment.H b/src/include/kernel/basesegment.H index 7f1c78dfa..8086c08b5 100644 --- a/src/include/kernel/basesegment.H +++ b/src/include/kernel/basesegment.H @@ -6,6 +6,8 @@ #include <kernel/segment.H> +// Forward declaration. +class MessageQueue; class Block; /** @class BaseSegment @@ -41,6 +43,16 @@ class BaseSegment : public Segment */ bool handlePageFault(task_t* i_task, uint64_t i_addr); + /** + * @brief Allocates a block of virtual memory of the given size + * @param i_mq[in] - Message queue to be associated with the block + * @param i_va[in] - Base virtual address of the block to be allocated + * @param i_size[in] - Requested virtual memory size of the block + * @return int - 0 for successful block allocation, non-zero otherwise + */ + static int mmAllocBlock(MessageQueue* i_mq,void* i_va, + uint64_t i_size); + private: /** * @brief Internal implementation of init function. |

