it's not documented whether a user need to allocate a memory priori or not.