123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- /*
- * Copyright 2011 Institute of Communication and Computer Systems (ICCS)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
- /**
- * \file search_algorithms.h
- * \author Ioannis Koutras (joko@microlab.ntua.gr)
- * \date September, 2011
- *
- * \brief Various search algorithms for linked list structures used on DMMLib.
- */
- #ifndef LINKED_LISTS_SEARCH_ALGORITHMS_H
- #define LINKED_LISTS_SEARCH_ALGORITHMS_H
- #include <dmmlib/heap.h>
- /**
- * Perform an exact-fit search on fixed lists for a block of a certain size
- *
- * \param heap The heap whose fixed lists should be accessed.
- * \param requested_size The desired size of the block.
- *
- * \return The pointer of the data part of the matched memory block.
- * \retval NULL No block was found.
- */
- void * search_on_fixed(heap_t * heap, size_t requested_size);
- void * best_fit_on_freelist(heap_t *heap, size_t requested_size);
- void * exact_fit_on_freelist(heap_t *heap, size_t requested_size);
- void * first_fit_on_freelist(heap_t *heap, size_t requested_size);
- #endif /* LINKED_LISTS_SEARCH_ALGORITHMS_H */
|