wangzhengquan
2020-08-01 5f7b0d34f54fee057814c3f146c871c474d53b75
src/queue/mm.c
@@ -304,6 +304,23 @@
  return hashtable;
}
void * mm_get_by_key(int key) {
  return hashtable_get(hashtable, key);
}
void mm_free_by_key(int key) {
  void *ptr;
  ptr = hashtable_get(hashtable, key);
  if(ptr != NULL) {
    mm_free(ptr);
    hashtable_remove(hashtable, key);
  }
}
int mm_alloc_key() {
  return hashtable_alloc_key(hashtable);
}
/*
 * mm_init - Initialize the memory manager
 */