Do not keep struct state on the stack.

This structure is huge (~18000 bytes on arm64) and can blow out
the stack very easily.
Modify the code to allocate these structures instead of leaving them
on the stack.

Bug: 14468519
Change-Id: I774f71235d896d32a14ab1af06f95ca9ef819f52
1 file changed