You get home from the grocery only to realize that you forgot to pick up the one ingredient you needed for dinner. You make plans to meet a friend for lunch but forgot you had a doctor's appointment at the same time.

If it seems like you've been forgetting more than you've been remembering lately, you're not alone. Many people have trouble with memory lapses. When we're younger, we tend to attribute those lapses to stress and overscheduling; as we age, every forgotten name or date feels like the harbinger of Alzheimer's disease or dementia.

Before you panic, try these steps to keep your mind sharp.

Women getting health check up If you're having problems with your memory, it's worth checking in with your doctor to figure out the cause. (Photo: Monkey Business Images/Shutterstock)

Get a checkup. You may think it's all in your head, but there are actually a number of health conditions that could be causing your memory problems. It's worth getting a complete checkup so that you know what you're really dealing with. In addition to Alzheimer's disease and dementia, other health issues that could cause memory loss include hypothyroidism, stroke, vitamin deficiencies, depression, menopause, sleep apnea and head injuries, according to WebMD. Memory loss may also occur as a side effect of taking certain medications. Talk to your doctor about your concerns and enlist his or her help in coming up with a plan to prevent future memory issues.

Turmeric A new study found that turmeric may help people with age-related memory loss lower their risk of Alzheimer's disease. (Photo: akepong srichaichana/Shutterstock)

Try a curry. Health experts have long wondered why older people in India have a lower prevalence of Alzheimer's disease and better cognitive performance than their peers in the rest of the world. According to a March 2018 study, consumption of turmeric — an ingredient used in the curries, dahls and vegetable dishes that make up much of Indian cuisine — may play a key role. For the study, researchers recruited 40 adults between the ages of 50 and 90 years who had mild memory complaints. Half received a placebo while the remaining half received 90 milligrams of curcumin (the key component of turmeric) twice daily for about 18 months. Researchers found that the participants who took curcumin performed 28 percent better on memory tests at the culmination of the study than those who were given the placebo.

Woman who can't sleep Lack of sleep can wreak havoc on your ability to remember even the simplest things. (Photo: andriano.cz/Shutterstock)

Get more sleep. The quality and quantity of your sleep play a pivotal role in your brain's ability to make and store memories, particularly new ones. According to this review in Psychology Today, sleep improves memory by protecting new memories from interference and by helping to sort and consolidate memories in order of importance. Without adequate sleep, these processes don't take place, and as a result, memory suffers. Bottom line: If you're having trouble remembering things during the day, you may want to take a closer look at how much sleep you're getting each night.

Woman distracted by phone You may be 'forgetting' things because you were never really paying attention to them at all. (Photo: ZoFot/Shutterstock)

Minimize distractions. You're on the phone with your boss while making dinner for your family, filling out your daughter's soccer registration form, answering a text and trying to keep the dog from eating all of the after-soccer snacks. Is it really any wonder that you can't remember the changes your boss wanted you to make on that big work project? Most of us have a number of tabs open in our brains at one time and that makes it difficult to really concentrate on any one subject. Even something as simple as texting a coworker during a meeting or scrolling through Facebook while your son tells you about his day could affect your ability to remember key points that you should have been paying attention to in the first place.

Exercising Daily exercise is not just good for your body, it's good for your brain too. (Photo: ESB Professional/Shutterstock)

Sweat it out. If you want to improve your memory, experts say you may not need to look any further than your neighborhood gym. In a study published in the journal, Brain, a multinational team of researchers found that physical exercise can help protect against cognitive decay in aging. And if you want to get the most bang for your sweat-session buck, this study found that exercise gives the greatest mental boost about four hours after learning something new. So whether you're studying for an exam or learning new concepts at work, hit the gym a few hours after you take it all in to boost your chances that you will remember it for good.

Woman drinking hot chocolate Can drinking hot cocoa stave off memory problems? Who cares!? It's delicious! (Photo: Rawpixel.com/Shutterstock)

Eat more chocolate. As if we needed another reason to love chocolate, how about this study linking the antioxidants in dark chocolate to improvements in age-related memory loss? The downside (if it's really a downside) is that you would need to eat the equivalent of three large chocolate bars per day to reap the memory-boosting benefits. While that may sound like heaven, chances are that your memory might benefit, but the rest of your health would suffer. Another option is to trade in those candy bars for hot chocolate. This study found that drinking just two cups of hot chocolate per day may "boost brain health and prevent memory decline in aging people." Now that's sweet.

Red wine and memory Red wine can help prevent memory loss? Cheers to that! (Photo: Syda Productions/Shutterstock)

Drink more wine. Red wine contains a component called reservatrol that has been shown to help boost short-term memory. Veronica Witte, a neuroscientist at the Charité Universitätsmedizin Berlin in Germany and a lead author of the study, noted that "regular, high-level intake of resveratrol in the elderly may convey protective effects on cognitive functions." In addition to red wine, reservatrol is also found in dark chocolate, red grapes, peanuts and blueberries.

Bunch of rosemary One study found that when students were exposed to the aroma of rosemary, they scored between five and seven percent better on memory tests. (Photo: Julia Sudnitskaya/Shutterstock)

Get a breath of fresh (rosemary-scented) air. Rosemary is a delicious herb that has been known to help with everything from hair loss to muscle aches to stress. And it's no secret that this fragrant herb can also help improve memory. Take it from the ancient Greeks who, according to lore, wore rosemary garlands in their hair during exams to help them in their studies. A study conducted by researchers at Northumbria University in the United Kingdom confirmed the memory-boosting powers of rosemary. Researchers found that students working in a room scented with rosemary, "displayed significantly enhanced prospective memory, with test scores 15 percent higher than those who had been in the room with no aroma."

Foods with magnesium Add these magnesium-rich power foods to your diet to give your memory a boost. (Photo: Evan Lorne/Shutterstock)

Give your diet a turbo boost. Magnesium is one of the most overlooked minerals in the average American's diet. According to the World Health Organization, less than 30 percent of adults get the recommended daily allowance of magnesium. That's bad news considering magnesium deficiency can cause muscle cramps, fatigue, insomnia, loss of appetite and memory disorders. Give your memory a boost by adding magnesium-rich foods, such as almonds, spinach, cashews, peanuts and black beans to your diet.