[kernel] Run global constructors
Look up the global constructor list that the linker outputs, and run them all. Required creation of the `kutil::no_construct` template for objects that are constructed before the global constructors are run. Also split the `memory_initialize` function into two - one for just those objects that need to happen before the global ctors, and one after. Tags: memory c++
This commit is contained in:
@@ -181,7 +181,7 @@ private:
|
||||
};
|
||||
|
||||
/// Global page manager.
|
||||
extern page_manager g_page_manager;
|
||||
extern page_manager &g_page_manager;
|
||||
|
||||
inline page_manager * page_manager::get() { return &g_page_manager; }
|
||||
|
||||
@@ -206,12 +206,3 @@ page_table_align(T p)
|
||||
{
|
||||
return ((p - 1) & ~0x1fffffull) + 0x200000;
|
||||
}
|
||||
|
||||
namespace kernel {
|
||||
namespace args {
|
||||
struct header;
|
||||
}
|
||||
}
|
||||
|
||||
/// Bootstrap the memory managers.
|
||||
void memory_initialize(kernel::args::header *mem_map);
|
||||
|
||||
Reference in New Issue
Block a user