Implement struct allocations for multiinstances

Signed-off-by: Michael Buesch <m@bues.ch>