summaryrefslogtreecommitdiff
path: root/secblock.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-08-24 12:19:42 -0400
committerJeffrey Walton <noloader@gmail.com>2018-08-24 12:19:42 -0400
commit4fb9fbf5ac8a0659f1b8dd5cbbbb3aa666f4cb19 (patch)
treeff624c716a9c67ac5f04e20fdc8abcc1273c3f8b /secblock.h
parentbeed647df2ef13f87a1d48ec50a1c75b0f900980 (diff)
downloadcryptopp-git-4fb9fbf5ac8a0659f1b8dd5cbbbb3aa666f4cb19.tar.gz
Update comments
Diffstat (limited to 'secblock.h')
-rw-r--r--secblock.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/secblock.h b/secblock.h
index 62d872bc..40fe51ac 100644
--- a/secblock.h
+++ b/secblock.h
@@ -511,8 +511,13 @@ private:
#else
+ // The 8-byte alignments follows convention of Linux and Windows.
+ // Linux and Windows receives most testing. Duplicate it here for
+ // other platforms like AIX and Solaris. AIX and Solaris often use
+ // alignments smaller than expected. In fact AIX caught us by
+ // surprise with word16 and word32.
T* GetAlignedArray() {return m_array;}
- T m_array[S];
+ CRYPTOPP_ALIGN_DATA(8) T m_array[S];
#endif
A m_fallbackAllocator;
@@ -657,8 +662,13 @@ public:
private:
+ // The 8-byte alignments follows convention of Linux and Windows.
+ // Linux and Windows receives most testing. Duplicate it here for
+ // other platforms like AIX and Solaris. AIX and Solaris often use
+ // alignments smaller than expected. In fact AIX caught us by
+ // surprise with word16 and word32.
T* GetAlignedArray() {return m_array;}
- T m_array[S];
+ CRYPTOPP_ALIGN_DATA(8) T m_array[S];
A m_fallbackAllocator;
bool m_allocated;