Here's my experience with the Google XML Sitemaps plugin and upgrading from 2.3.3 to 2.5 and now to 2.5.1. Basically I've had no problems with the plugin at all so here's some info in hopes that it might help the folks who might be having memory problems
For me: The debug information comes through with no errors, I can rebuild the sitemap successfully (actually turn around time to page refresh was about 12 seconds):
The building process took about 2.76 seconds to complete and used 20.25 MB of memory.
Checking with Google's Webmaster Tools, my submitted sitemaps show no errors, my site is correctly indexed in accordance with my sitemap and "robots.txt". No errors.
I ran a test post to try and duplicate some of the problems of publishing taking over 50 seconds for some folks and from time I hit the "Publish" button to the actual moment the post was published was Approximately 11 seconds. The sitemap rebuilt normally at time of publish:
The building process took about 6.37 seconds to complete and used 20.25 MB of memory.
One of the things I did quite awhile ago was to stick a "php.ini" file (normally found in your root directory...I made a copy of mine) into my "plugins" folder where I was concerned about script functions that took more than the default 8 or 16 MB's of memory to execute. Also, after a major upgrade, it's not uncommon for certain scripts which ran fine before to require more memory to execute the first few times. I don't know why this is exactly but I've encountered it more than once.
Here's a couple things you can try:
1. in the Google XML plugins settings, set memory limit to 32 and save your settings. Then try rebuilding again. If successful then try another post and see what happens.
2. In any WordPress install, your host should have put a "php.ini" file in your root directory. Bring this file up in your favorite editor and look for a section called "Memory Resources" or the equivalent. It should have a couple of lines that look like this:
max_execution_time = 30 ; Maximum execution time of each script, in seconds
memory_limit = 32 ; Maximum amount of memory a script may consume (8MB)
If memory limit isn't equal to 32 (it might be set to 16 for example) then change the number to 32. You might also want to make sure that the "max_execution_time is set to a minimum of 30 also. Once that's done, save it back to your root directory on your server. Now try to rebuild your sitemap.
If you encounter the same problem then make a copy of that "php.ini" file and drop it right into your "wp-content/plugins" directory and try rebuilding once more. I'd be surprised if one of these solutions didn't solve your problem.