Browse Source

Reserve 10KB for error reporting.

release/v0.1
Rafal Kupiec 4 years ago
parent
commit
383fe01943
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
  1. 2
      engine/lib/memory.c

2
engine/lib/memory.c

@ -115,7 +115,7 @@ static const SyMemMethods sOSAllocMethods = {
0
};
static sxi32 MemBackendCalculate(SyMemBackend *pBackend, sxi32 nBytes) {
if(pBackend->pHeap->nLimit && (pBackend->pHeap->nSize + nBytes > pBackend->pHeap->nLimit)) {
if(pBackend->pHeap->nLimit && (pBackend->pHeap->nSize + nBytes > pBackend->pHeap->nLimit - 10240)) {
if(pBackend->xMemError) {
pBackend->xMemError(pBackend->pUserData);
}

Loading…
Cancel
Save