public synchronized void lock(Object user, MemoryManageable mm) {
        if (user == null || mm == null)
            return;
//System.out.println("+-+ MM.lock()    user: " + user + ", mm: " + mm);
        HashSet<MemoryManageable> inUse = locked.get(user);
        if (inUse == null) {
            inUse = new HashSet<MemoryManageable>(256);
            locked.put(user, inUse);
        }
        inUse.add(mm);

        leastRecentlyUsed.remove(mm);
        leastRecentlyUsed.add(mm);

        if (maxSize > 0) {
            int numUsed = leastRecentlyUsed.size();
            int numUsedMoreThanShould = numUsed - maxSize;
            if (numUsedMoreThanShould > 0) {
//System.out.println("+-+ MM.lock()      numUsedMoreThanShould: " + numUsedMoreThanShould + ", maxSize: " + maxSize + ", numUsed: " + numUsed);
                int numToDo = Math.max(purgeSize, numUsedMoreThanShould);
                reduceMemory(numToDo);
            }
        }
    }