clean up, avoid aliasing concerns in non-debug case
This commit is contained in:
14
sh.h
14
sh.h
@ -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 */
|
||||
|
Reference in New Issue
Block a user