I have found another thing that seems to help. Instead of loading a level directly, and worrying about purging different entities with ent_purge, I've found that loading a blank level seems to clear the entities automatically. Then you can load the level you need next.

Something like this:

Quote:
level_load("Blank.WMB");//load a blank level to clear entities
wait(2);

proc_kill(16);//kill all ongoing processes if necessary

bmap_purge(bitmaps);//use this command to purge bitmaps
//some of them need to purged separately or they fill up the
//d3d_texbmaps memory - I think you can only purge bitmaps
//that were declared with a BMAP* pointer

level_load("Next_Level.WMB");//load the next level
wait(2);


On my smaller game, this is not necessary. The engine seems to handle purging memory very well. I'm sure there is something in my code (on the bigger game) that is causing these problems, but I have yet to find it. In the meantime, these techniques seem to keep the memory from stacking...