stack with memcpy, which will grows when more elements are added