In children, the medullary cavity is filled with red marrow due to the high demand for blood cell production. As a person ages, red marrow is gradually replaced by yellow marrow. However, specific bones such as the pelvis, ribs, and vertebrae retain red marrow throughout life to ensure adequate blood cell production.