jyao1 / rust-tpm-20-ref

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Set MAX_TPM_CONTEXT_COUNT in build time

mxu9 opened this issue · comments

commented

A TPM_CONTEXT represents a vTPM intance. Currently we use an array to host the TPM_CONTEXT. Its size is fixed (MAX_TPM_CONTEXT_COUNT). The benefit of using a fixed size array is that it will never fail because of out_of_memory in run-time. But it is not flexible that the array size has to be changed in source code.