Inclusion Criteria:  >= 4 and < 18 years at time of study entry Patients must weigh 15 kg or greater at time of study entry Newly diagnosed or recurrent primary brain tumors that have not received prior cranial radiotherapy Planned focal, cranial or craniospinal radiation treatment for a primary brain tumor The patient must have receptive and expressive language skills in English, French or Spanish since the neurocognitive function and quality of life (QOL) assessment instruments are available in these languages only  Creatinine clearance or radioisotope glomerular filtration rate (GFR) >= 70 mL/min/1.73 m^2 or a serum creatinine based on age/gender as follows:  Age: 4 to < 6 years; Maximum serum creatinine (mg/dL): 0.8 male; 0.8 female Age: 6 to < 10 years; Maximum serum creatinine (mg/dL): 1 male; 1 female Age: 10 to < 13 years; Maximum serum creatinine (mg/dL): 1.2 male; 1.2 female Age: 13 to < 16 years; Maximum serum creatinine (mg/dL): 1.5 male; 1.4 female Age: >= 16 years; Maximum serum creatinine (mg/dL): 1.7 male; 1.4 female Total bilirubin =< 1.5 x upper limit of normal (ULN) for age  Serum glutamate pyruvate transaminase (SGPT) (alanine aminotransferase [ALT]) =< 135 U/L  Note: For the purpose of this study, the ULN for SGPT (ALT) has been set to the value of 45 U/L The patient must be able to undergo magnetic resonance imaging All patients and/or their parents or legal guardians must sign a written informed consent All institutional, Food and Drug Administration (FDA), and National Cancer Institute (NCI) requirements for human studies must be met  Exclusion Criteria:  Life expectancy of less than 18 months  Pre-existing conditions:  Any contraindication or allergy to memantine Intractable seizures while on adequate anticonvulsant therapy, defined as more than one seizure per month for the past 2 months or since initiating anticonvulsant therapy Co-morbid systemic illnesses, psychiatric conditions, social situations, or other severe concurrent disease which, in the judgment of the investigator, would make the patient inappropriate for entry into this study or interfere significantly with the proper assessment of safety and toxicity of the prescribed regimens or would limit compliance with the study requirements Patients with a motor, visual, or auditory condition that precludes computerized neurocognitive assessments are not eligible to participate Patients with any medical condition or taking medications that lead to alterations of urine pH towards the alkaline condition (e.g., renal tubular acidosis, carbonic anhydrase inhibitors, sodium bicarbonate)  Personal history of prior cranial or craniospinal radiotherapy is not allowed  Note: Prior anti-cancer therapy including surgery, chemotherapy, targeted agents are allowed as per standard of care clinical treatment guidelines Female patients who are pregnant are excluded since fetal toxicities and teratogenic effects have been noted for the study drug. A pregnancy test is required for female patients of childbearing potential Lactating females who plan to breastfeed their infants Sexually active patients of reproductive potential who do not agree to use an effective contraceptive method for the duration of their study participation