portx64: warn if memory pool is full

This commit is contained in:
Raf committed 2024-08-02 17:47:35 +08:00
1 parent 89397bd566
commit 5beef0916b
1 file changed
+3
+3
View File
@@ -6,6 +6,7 @@
#include "lib/memp.h"
#include "data.h"
#include "types.h"
#include "system.h"
/**
* memp - memory pool allocation system.
@@ -178,10 +179,12 @@ void *mempAllocFromBank(struct memorypool *pool, u32 size, u8 poolnum)
}
if (pool->leftpos > pool->rightpos) {
sysLogPrintf(LOG_NOTE, "#warning: memory pool %x is full. Req: %d\n", pool, size);
return 0;
}
if (pool->leftpos + size > pool->rightpos) {
sysLogPrintf(LOG_NOTE, "#warning: memory pool %x is full. Req: %d\n", pool, size);
return 0;
}