OK, missunderstood your problem. Sorry. Look in manual bmap_purge (as already said), and bmap_preload for texture memory management. It's pretty much spelled out there.
cheers