Vaisesika Sūtras
Vaisesika Sūtra 9.2.06
आत्ममनसोः संयोगविशेषात् संस्काराच्च स्मृतिः ॥६॥
ātma-manasoḥ saṁyoga-viśeṣāt saṁskārāt ca smṛtiḥ ॥6॥
[आत्म (ātma) - self; मनसोः (manasoḥ) - and of mind; संयोगविशेषात् (saṁyoga-viśeṣāt) - due to specific conjunction; संस्कारात् (saṁskārāt) - from impression; च (ca) - and; स्मृतिः (smṛtiḥ) - memory;]
Memory arises from the impression formed by the specific and special conjunction of self and mind.