mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-08-03 17:26:08 -04:00
Doc
This commit is contained in:
parent
03dc809028
commit
42674fc884
@ -12,18 +12,58 @@
|
||||
|
||||
namespace physical_allocator {
|
||||
|
||||
/*!
|
||||
* \brief Early initialization of the physical allocator.
|
||||
*
|
||||
* This finalizes the e820 memory detection and start preparing memory from one of the blocks
|
||||
*/
|
||||
void early_init();
|
||||
|
||||
/*!
|
||||
* \brief Early allocation of physical memory pages
|
||||
* \param pages The number of pages to allocate
|
||||
*/
|
||||
size_t early_allocate(size_t pages);
|
||||
|
||||
/*
|
||||
* \brief Initialize the real physical allocator.
|
||||
*
|
||||
* After this point, the early_allocate function should not be called
|
||||
*/
|
||||
void init();
|
||||
|
||||
/*!
|
||||
* \brief Finalize the physical allocator, must be called after sysfs initialization
|
||||
*/
|
||||
void finalize();
|
||||
|
||||
/*!
|
||||
* \brief Allocate several pages of physical memory
|
||||
* \param pages The number of pages
|
||||
* \return The physical addres of the allocated pages
|
||||
*/
|
||||
size_t allocate(size_t pages);
|
||||
|
||||
/*!
|
||||
* \brief Free the allocated physical memory
|
||||
* \param address The address of the allocated physical memory
|
||||
* \param pages The number of pages
|
||||
*/
|
||||
void free(size_t address, size_t pages);
|
||||
|
||||
/*!
|
||||
* \brief Return the amount of physical memory available
|
||||
*/
|
||||
size_t available();
|
||||
|
||||
/*!
|
||||
* \brief Return the amount of physical memory allocated
|
||||
*/
|
||||
size_t allocated();
|
||||
|
||||
/*!
|
||||
* \brief Return the amount of physical memory free
|
||||
*/
|
||||
size_t free();
|
||||
|
||||
} //end of physical_allocator namespace
|
||||
|
Loading…
x
Reference in New Issue
Block a user