ref: 2449ed0980f4119a0d2ae141b2ee79529a7ff8df
parent: 3dd075b4624ceaeff466b9cfe5bfe7bd5a694ae6
author: Marc-Alexandre Espiaut <marcalexandre@member.fsf.org>
date: Tue Jun 5 08:23:03 EDT 2018
Removing obsolete *TEST and DEVELOPMENT code from z_zone.c
--- a/rott/z_zone.c
+++ b/rott/z_zone.c
@@ -30,9 +30,6 @@
#include "develop.h"
#include "rt_net.h"
-#if (DEVELOPMENT == 1)
-#include "rt_main.h"
-#endif
//MED
#include "memcheck.h"
@@ -256,10 +253,6 @@
========================
*/
-#if (DEVELOPMENT == 1)
-int totallevelsize=0;
-#endif
-
void *Z_Malloc (int size, int tag, void *user)
{
int extra;
@@ -341,12 +334,6 @@
mainzone->rover = base->next; // next allocation will start looking here
-
-#if (MEMORYCORRUPTIONTEST==1)
- base->posttag=MEMORYPOSTTAG;
- base->pretag=MEMORYPRETAG;
-#endif
-
return (void *) ((byte *)base + sizeof(memblock_t));
}
@@ -441,11 +428,6 @@
levelzone->rover = base->next; // next allocation will start looking here
-#if (MEMORYCORRUPTIONTEST==1)
- base->posttag=MEMORYPOSTTAG;
- base->pretag=MEMORYPRETAG;
-#endif
-
return (void *) ((byte *)base + sizeof(memblock_t));
}
@@ -672,15 +654,6 @@
Error ("Z_CheckHeap: next block doesn't have proper back link\n");
if (!block->user && !block->next->user)
Error ("Z_CheckHeap: two consecutive free blocks\n");
-#if (MEMORYCORRUPTIONTEST==1)
- if ((block->tag>0) && (block->user>0))
- {
- if (block->posttag!=MEMORYPOSTTAG)
- Error("Z_CheckHeap: Corrupted posttag\n");
- if (block->pretag!=MEMORYPRETAG)
- Error("Z_CheckHeap: Corrupted pretag\n");
- }
-#endif
}
// Check levelzone
@@ -695,15 +668,6 @@
Error ("Z_CheckHeap: next block doesn't have proper back link\n");
if (!block->user && !block->next->user)
Error ("Z_CheckHeap: two consecutive free blocks\n");
-#if (MEMORYCORRUPTIONTEST==1)
- if ((block->tag>0) && (block->user>0))
- {
- if (block->posttag!=MEMORYPOSTTAG)
- Error("Z_CheckHeap: Corrupted posttag\n");
- if (block->pretag!=MEMORYPRETAG)
- Error("Z_CheckHeap: Corrupted pretag\n");
- }
-#endif
}
}