clean up, avoid aliasing concerns in non-debug case

This commit is contained in:
tg
2016-02-26 21:53:37 +00:00
parent 4a21365067
commit f23ed68f00
3 changed files with 23 additions and 23 deletions

14
sh.h
View File

@ -175,7 +175,7 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.764 2016/02/26 20:56:45 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.765 2016/02/26 21:53:37 tg Exp $");
#endif
#define MKSH_VERSION "R52 2016/02/26"
@ -703,21 +703,21 @@ struct lalloc_common {
struct lalloc_common *next;
};
#ifdef MKSH_ALLOC_CATCH_UNDERRUNS
struct lalloc_item {
struct lalloc_common *next;
#ifdef MKSH_ALLOC_CATCH_UNDERRUNS
size_t len;
char dummy[8192 - sizeof(struct lalloc_common *) - sizeof(size_t)];
#endif
};
#endif
/* 2. sizes */
#ifdef MKSH_ALLOC_CATCH_UNDERRUNS
#define ALLOC_ITEM struct lalloc_item
#define ALLOC_SIZE (sizeof(ALLOC_ITEM))
#ifndef MKSH_ALLOC_CATCH_UNDERRUNS
#define ALLOC_OVERHEAD ALLOC_SIZE
#else
#define ALLOC_OVERHEAD 0
#else
#define ALLOC_ITEM struct lalloc_common
#define ALLOC_OVERHEAD (sizeof(ALLOC_ITEM))
#endif
/* 3. group structure */