mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-12-25 12:33:42 +01:00
Align `sos_memory' to MAX_ALIGN
We give aligned pointers from the `sos_memory' array, so any non-aligned bytes are only wasted.
This commit is contained in:
parent
c36a14f245
commit
26fc1563fb
2 changed files with 4 additions and 1 deletions
|
@ -31,6 +31,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|||
#define COMPILER_H
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define ALIGNED(x) __attribute__((aligned(x)))
|
||||
# define UNUSED __attribute__((unused))
|
||||
# define NORETURN __attribute__((noreturn))
|
||||
# define ALIAS(name) __attribute__((alias (#name)))
|
||||
|
@ -51,6 +52,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|||
# define unlikely(x) (x)
|
||||
# endif
|
||||
#else
|
||||
# define ALIGNED(x)
|
||||
# define ALWAYS_INLINE
|
||||
# define UNUSED
|
||||
# define NORETURN
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* libunwind - a platform-independent unwind library
|
||||
Copyright (C) 2002-2003, 2005 Hewlett-Packard Co
|
||||
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
|
||||
|
||||
This file is part of libunwind.
|
||||
|
||||
|
@ -38,7 +39,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|||
# define MAX_ALIGN MAX_ALIGN_(sizeof (long double))
|
||||
#endif
|
||||
|
||||
static char sos_memory[SOS_MEMORY_SIZE];
|
||||
static char sos_memory[SOS_MEMORY_SIZE] ALIGNED(MAX_ALIGN);
|
||||
static char *sos_memp;
|
||||
static size_t pg_size;
|
||||
|
||||
|
|
Loading…
Reference in a new issue