bootloader: Add tracing to malloc_large()
This commit is contained in:
@@ -261,15 +261,19 @@ static void*
|
|||||||
malloc_large(size_t size)
|
malloc_large(size_t size)
|
||||||
{
|
{
|
||||||
LargeAllocation* allocation = new(std::nothrow) LargeAllocation;
|
LargeAllocation* allocation = new(std::nothrow) LargeAllocation;
|
||||||
if (allocation == NULL)
|
if (allocation == NULL) {
|
||||||
|
dprintf("malloc_large(): Out of memory!\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (allocation->Allocate(size) != B_OK) {
|
if (allocation->Allocate(size) != B_OK) {
|
||||||
|
dprintf("malloc_large(): Out of memory!\n");
|
||||||
delete allocation;
|
delete allocation;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
sLargeAllocations.InsertUnchecked(allocation);
|
sLargeAllocations.InsertUnchecked(allocation);
|
||||||
|
TRACE("malloc_large(%lu) -> %p\n", size, allocation->Address());
|
||||||
return allocation->Address();
|
return allocation->Address();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user