diff src/gpf/osl/os_mem_ir.c @ 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 8b2a9a374324
children
line wrap: on
line diff
--- 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);