aboutsummaryrefslogtreecommitdiff
path: root/MemoryType.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2017-03-30 09:10:56 -0700
committerAndreas Huber <andih@google.com>2017-03-31 10:07:44 -0700
commit60d3b22101e911242d2d41c8dc8309e8706f1fe1 (patch)
treefe829955504b8be873f6b4374ed2ce921f18e996 /MemoryType.cpp
parent038903b7f99f27179d1e9411f9181b467ccd7ac1 (diff)
downloadhidl-60d3b22101e911242d2d41c8dc8309e8706f1fe1.tar.gz
More stringently verify expected alignment of fields in hidl compound types.
Change-Id: I222d78163ac5d7cc5af405b0c3d0586ed7528213 Bug: 33846034 Test: make
Diffstat (limited to 'MemoryType.cpp')
-rw-r--r--MemoryType.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/MemoryType.cpp b/MemoryType.cpp
index 3243cd48..614f3687 100644
--- a/MemoryType.cpp
+++ b/MemoryType.cpp
@@ -141,7 +141,8 @@ bool MemoryType::isJavaCompatible() const {
}
void MemoryType::getAlignmentAndSize(size_t *align, size_t *size) const {
- *align = *size = 8;
+ *align = 8; // hidl_memory
+ *size = 40;
}
status_t MemoryType::emitVtsTypeDeclarations(Formatter &out) const {