minetest/minetest — pull request #746 by kahrl (2013-06-02 13:44:57+00:00)
Title: Unload blocks during /clearobjects

Currently /clearobjects never unloads the blocks it loads (until the command completes and the normal server operation resumes, causing Map::timerUpdate() to be called again). /clearobjects consumes 13GB on VanessaE's server, for example.

With this patch, Environment::clearAllObjects() unloads unused blocks in an interval
defined by max_clearobjects_extra_loaded_blocks (default 4096). Blocks that were already loaded before /clearobjects won't be unloaded by the new code.