x86/paging: Do not use array placement new
Array placement new has implementation defined memory overhead what makes it pretty useless.
This commit is contained in:
@@ -295,10 +295,10 @@ X86PagingMethod32Bit::Init(kernel_args* args,
|
|||||||
|
|
||||||
// create the initial pools for the physical page mapper
|
// create the initial pools for the physical page mapper
|
||||||
int32 poolCount = _GetInitialPoolCount();
|
int32 poolCount = _GetInitialPoolCount();
|
||||||
PhysicalPageSlotPool* pool
|
PhysicalPageSlotPool* pool = PhysicalPageSlotPool::sInitialPhysicalPagePool;
|
||||||
= new(&PhysicalPageSlotPool::sInitialPhysicalPagePool)
|
|
||||||
PhysicalPageSlotPool[poolCount];
|
|
||||||
for (int32 i = 0; i < poolCount; i++) {
|
for (int32 i = 0; i < poolCount; i++) {
|
||||||
|
new(&pool[i]) PhysicalPageSlotPool;
|
||||||
status_t error = pool[i].InitInitial(args);
|
status_t error = pool[i].InitInitial(args);
|
||||||
if (error != B_OK) {
|
if (error != B_OK) {
|
||||||
panic("X86PagingMethod32Bit::Init(): Failed to create initial pool "
|
panic("X86PagingMethod32Bit::Init(): Failed to create initial pool "
|
||||||
|
|||||||
@@ -595,10 +595,10 @@ X86PagingMethodPAE::Init(kernel_args* args,
|
|||||||
|
|
||||||
// create the initial pools for the physical page mapper
|
// create the initial pools for the physical page mapper
|
||||||
int32 poolCount = _GetInitialPoolCount();
|
int32 poolCount = _GetInitialPoolCount();
|
||||||
PhysicalPageSlotPool* pool
|
PhysicalPageSlotPool* pool = PhysicalPageSlotPool::sInitialPhysicalPagePool;
|
||||||
= new(&PhysicalPageSlotPool::sInitialPhysicalPagePool)
|
|
||||||
PhysicalPageSlotPool[poolCount];
|
|
||||||
for (int32 i = 0; i < poolCount; i++) {
|
for (int32 i = 0; i < poolCount; i++) {
|
||||||
|
new(&pool[i]) PhysicalPageSlotPool;
|
||||||
status_t error = pool[i].InitInitial(this, args);
|
status_t error = pool[i].InitInitial(this, args);
|
||||||
if (error != B_OK) {
|
if (error != B_OK) {
|
||||||
panic("X86PagingMethodPAE::Init(): Failed to create initial pool "
|
panic("X86PagingMethodPAE::Init(): Failed to create initial pool "
|
||||||
|
|||||||
Reference in New Issue
Block a user