allocate vs retain

allocate

verb
  • To set aside for a purpose. 

  • To distribute according to a plan, generally followed by the adposition to. 

  • To reserve a portion of memory for use by a computer program. 

retain

verb
  • To keep in possession or use. 

  • To employ by paying a retainer. 

  • To hold back (a pupil) instead of allowing them to advance to the next class or year. 

  • To keep in one's pay or service. 

  • To hold secure. 

How often have the words allocate and retain occurred in a corpus of books? (source: Google Ngram Viewer )