Browse Source

Add more comments.

release/v0.1
Rafal Kupiec 3 years ago
parent
commit
3e1d91e909
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      engine/vm.c

+ 2
- 0
engine/vm.c View File

@ -1897,9 +1897,11 @@ PH7_PRIVATE sxi32 PH7_VmMemoryError(
if(pVm->bErrReport) {
/* Report OOM problem */
VmInstr *pInstr = SySetPeek(&pVm->aInstrSet);
/* Initialize the working buffer */
SyBlobInit(&sWorker, &pVm->sAllocator);
SyBlobFormat(&sWorker, "Fatal: PH7 Engine is running out of memory. Allocated %u bytes in %z:%u",
pVm->sAllocator.pHeap->nSize, pInstr->pFile, pInstr->iLine);
/* Consume the error message */
VmCallErrorHandler(&(*pVm), &sWorker);
}
/* Set exit code to 255 */


Loading…
Cancel
Save