Fixed memory tests to use a linked list (i.e. dynamic) rather than fixed-size array