diff options
author | Robert Moore <Robert.Moore@intel.com> | 2021-12-08 13:03:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-08 13:03:44 -0800 |
commit | 7797b6ada03251c4f59e73eda85055ff0bcdd8db (patch) | |
tree | f3484feb56045dd2eb68f34605c8afacf7414c50 | |
parent | 6de0131ecd6b1f507cc8ab2a9b09cfd1fc4db3e9 (diff) | |
parent | bc08cde8ffe45d1a7f2c32ed72e719c58eec4bcb (diff) | |
download | acpica-7797b6ada03251c4f59e73eda85055ff0bcdd8db.tar.gz |
Merge pull request #721 from jrtc27/local-cache-calloc-align
iASL: Fix unaligned accesses to local cache allocations
-rw-r--r-- | source/compiler/aslcache.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/compiler/aslcache.c b/source/compiler/aslcache.c index 51e6f4c46..05ae19b74 100644 --- a/source/compiler/aslcache.c +++ b/source/compiler/aslcache.c @@ -183,6 +183,11 @@ UtLocalCacheCalloc ( UINT32 CacheSize = ASL_STRING_CACHE_SIZE; +#ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED + /* Used for objects other than strings, so keep allocations aligned */ + Length = ACPI_ROUND_UP_TO_NATIVE_WORD (Length); +#endif + if (Length > CacheSize) { CacheSize = Length; |