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:
parent
bcfdf88186
commit
02749e2429
@ -295,10 +295,10 @@ X86PagingMethod32Bit::Init(kernel_args* args,
|
||||
|
||||
// create the initial pools for the physical page mapper
|
||||
int32 poolCount = _GetInitialPoolCount();
|
||||
PhysicalPageSlotPool* pool
|
||||
= new(&PhysicalPageSlotPool::sInitialPhysicalPagePool)
|
||||
PhysicalPageSlotPool[poolCount];
|
||||
PhysicalPageSlotPool* pool = PhysicalPageSlotPool::sInitialPhysicalPagePool;
|
||||
|
||||
for (int32 i = 0; i < poolCount; i++) {
|
||||
new(&pool[i]) PhysicalPageSlotPool;
|
||||
status_t error = pool[i].InitInitial(args);
|
||||
if (error != B_OK) {
|
||||
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
|
||||
int32 poolCount = _GetInitialPoolCount();
|
||||
PhysicalPageSlotPool* pool
|
||||
= new(&PhysicalPageSlotPool::sInitialPhysicalPagePool)
|
||||
PhysicalPageSlotPool[poolCount];
|
||||
PhysicalPageSlotPool* pool = PhysicalPageSlotPool::sInitialPhysicalPagePool;
|
||||
|
||||
for (int32 i = 0; i < poolCount; i++) {
|
||||
new(&pool[i]) PhysicalPageSlotPool;
|
||||
status_t error = pool[i].InitInitial(this, args);
|
||||
if (error != B_OK) {
|
||||
panic("X86PagingMethodPAE::Init(): Failed to create initial pool "
|
||||
|
Loading…
Reference in New Issue
Block a user