Better way to loop through all posts without using a boatload of memory?

I’ve been looking, but haven’t found any obvious way (perhaps I’m just missing it) to start at the first post, do some processing, and loop to the next, until the last post.

This approach uses just a TON of memory when there’s 13,000 posts (yeah, oops):

$postslist = get_posts($args);
foreach ($postslist as $post) {

Any better techniques?