It could be either dude....

....i have the same problem....luckily only when im stoned (i take it you get it all the time??)....but ill be lying in bed or somthing....deep deep in thought about somthing totally random.....then i will try and think about somthing I thought about a few seconds ago and not have a clue what I had been thinking about....i can forget entire 10 minute thought patterns....

but yeah....if it only happens when you smoke, and doesnt when you take breaks it probly the weed....
...if it happens all the time it could be one of many many things.....due to disease or injury, emotional trauma....

here is a short list of things known to cause memory loss....

Aging
Alzheimer's disease
Neurodegenerative illness
Head trauma or injury
Hysteria often accompanied by confusion
Seizures
General anesthetics such as halothane, isoflurane, and fentanyl
Alcoholism
Stroke or transient ischemic attack (TIA)
Transient global amnesia
Drugs such as barbiturates or benzodiazepines
Electroconvulsive therapy (especially if prolonged)
Temporal lobe brain surgery
Brain masses (caused by tumors or infection)
Herpes encephalitis
Other brain infections
Depression

so if its reallly bad get help.....if its mild.....wait.....who am i to tell you to get help......lol