First low memory version with memory usage logging