1
1

- since we append new registrations to the end of the list,

need to remove old ones from the front
- call deregister to actually remove items from the cache/mru
list and deregister the memory (if not being used)

This commit was SVN r7476.
Этот коммит содержится в:
Tim Woodall 2005-09-21 23:25:16 +00:00
родитель 9791c066e8
Коммит da1e4a1292

Просмотреть файл

@ -41,9 +41,13 @@ int mca_rcache_rb_mru_insert(
) {
mca_mpool_base_registration_t* old_reg;
if(rcache->reg_mru_len <= rcache->mru_list.opal_list_length) {
/* call deregister - which removes the registration from
* the tree and mru list. memory will be deregistered when
* the reference count goes to zero.
*/
old_reg = (mca_mpool_base_registration_t*)
opal_list_remove_last(&rcache->mru_list);
/* need to pull out of rb tree here */
opal_list_get_first(&rcache->mru_list);
old_reg->mpool->mpool_deregister(old_reg->mpool, old_reg);
}
opal_list_append(&rcache->mru_list,(opal_list_item_t*) reg);
return OMPI_SUCCESS;