The medullary cavity (medulla, innermost part) is the central cavity of bone shafts where red bone marrow and/or yellow bone marrow (adipose tissue) is stored; hence, the medullary cavity is also known as the marrow cavity.
Located in the main shaft of a long bone (diaphysis) (consisting mostly of compact bone), the medullary cavity has walls composed of spongy bone (cancellous bone) and is lined with a thin, vascular membrane (endosteum).
However, the medullary cavity is the area inside any bone (long, flat, etc.) that holds the bone marrow.
The area has been detected in fossil bones despite the fossilization process.
Intramedullary is a medical term meaning the inside of a bone.
Credits to the contents of this page go to the authors of the corresponding Wikipedia page: en.wikipedia.org/wiki/Medullary cavity.