Ok, the movie is about a guy in prison cell/mental facility, the main guy goes into his mind/head to see if he is guilty of a crime, when he gets in his mind (literally in his mind, he is walking in his mind) to see his thoughts and memories. But he gets stuck in the mind, time passes and he is still there (he lives in all this guys memories, his childhood, his teen life). He is living in the guys thoughts and memories (he talks to a voice, like for instance (miriam (the voices name also the computer) take me to Christmas eve, then he gets teleported to Christmas eve) and relives the guy's Christmas eve. But later he learns to talk to the guy in his memory by going to the memory he is thinking about. They meet there and start talking? (For example, if the guy is thinking about Christmas eve, and the main character is at his Christmas eve, they can talk.) By the end they go to an empty room, and the guy in the head tells the prisoner to think of that room, what was in the room, what colour it was, everything about it, and that's what solves the murder case. It's an English movie, Hollywood, the whole movie takes place in the guys mind.
The movie is called Extracted, found it on yahoo answers:
A scientist who has invented a technique to watch people's memories finds himself in a dangerous situation after he's tasked with entering a heroin addict's mind to see whether the man committed murder.