Assert that memory was allocated