FreeCalypso > hg > fc-selenite
changeset 104:82ae724ca0d7
OSL reconstruction fixed to support memory supervision
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 23 Jul 2018 01:47:29 +0000 |
parents | 1155be085fc1 |
children | 5c4db73d289a |
files | src/gpf/osl/os_mem_fl.c src/gpf/osl/os_mem_ir.c |
diffstat | 2 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gpf/osl/os_mem_fl.c Sun Jul 22 20:44:47 2018 +0000 +++ b/src/gpf/osl/os_mem_fl.c Mon Jul 23 01:47:29 2018 +0000 @@ -361,8 +361,9 @@ bzero(&npool->pcb, sizeof(NU_PARTITION_POOL)); #endif if (NU_Create_Partition_Pool(&npool->pcb, PoolName, npool->pool_mem, - POOL_SIZE(Num, Size), Size + 4, NU_FIFO) - != NU_SUCCESS) + POOL_SIZE(Num, Size), + Size + PT_CHKOVERHEAD + PPM_OVERHEAD, + NU_FIFO) != NU_SUCCESS) goto release_sem_return_err; if (!part_group_head) PartGrpTable[part_group].grp_head = npool;
--- a/src/gpf/osl/os_mem_ir.c Sun Jul 22 20:44:47 2018 +0000 +++ b/src/gpf/osl/os_mem_ir.c Mon Jul 23 01:47:29 2018 +0000 @@ -39,11 +39,12 @@ PM_HEADER *phdr; PM_PCB *pool; - phdr = (PM_HEADER *)(ptr - 2); + phdr = (PM_HEADER *)(ptr - PPM_OFFSET - 2); if (phdr->pm_next_available) return(OS_PARTITION_FREE); pool = phdr->pm_partition_pool; - if (ptr[(pool->pm_partition_size - 4) >> 2] == GUARD_PATTERN) + if (ptr[((pool->pm_partition_size - 4) >> 2) - PPM_OFFSET] == + GUARD_PATTERN) return(OS_OK); else return(OS_PARTITION_GUARD_PATTERN_DESTROYED);