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:
Pawel Dziepak 2013-12-11 01:59:31 +01:00
parent bcfdf88186
commit 02749e2429
2 changed files with 6 additions and 6 deletions

View File

@ -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 "

View File

@ -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 "