use static logger
This commit is contained in:
@ -25,7 +25,7 @@ void BumpAllocator::init() {
|
||||
this->allocations = 0;
|
||||
this->next = (unsigned char*)heap_start;
|
||||
|
||||
log << INFO << "Initialized Bump Allocator" << endl;
|
||||
log.info() << "Initialized Bump Allocator" << endl;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
@ -51,10 +51,10 @@ void* BumpAllocator::alloc(unsigned int req_size) {
|
||||
|
||||
/* Hier muess Code eingefuegt werden */
|
||||
|
||||
log << DEBUG << "Requested " << hex << req_size << " Bytes" << endl;
|
||||
log.debug() << "Requested " << hex << req_size << " Bytes" << endl;
|
||||
|
||||
if (req_size + (unsigned int)this->next > this->heap_end) {
|
||||
log << ERROR << " - More memory requested than available :(" << endl;
|
||||
log.error() << " - More memory requested than available :(" << endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ void* BumpAllocator::alloc(unsigned int req_size) {
|
||||
this->next = (unsigned char*)((unsigned int)this->next + req_size);
|
||||
this->allocations = this->allocations + 1;
|
||||
|
||||
log << TRACE << " - Allocated " << hex << req_size << " Bytes." << endl;
|
||||
log.trace() << " - Allocated " << hex << req_size << " Bytes." << endl;
|
||||
|
||||
return allocated;
|
||||
}
|
||||
@ -73,5 +73,5 @@ void* BumpAllocator::alloc(unsigned int req_size) {
|
||||
* Beschreibung: Nicht implementiert. *
|
||||
*****************************************************************************/
|
||||
void BumpAllocator::free(void* ptr) {
|
||||
log << ERROR << " mm_free: ptr= " << hex << (unsigned int)ptr << ", not supported" << endl;
|
||||
log.error() << " mm_free: ptr= " << hex << (unsigned int)ptr << ", not supported" << endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user