Browse Source

remove obsolete files

Ioannis Koutras 12 years ago
parent
commit
69647b14c2

+ 0 - 43
include/dmmlib/custom_realloc.h

@@ -1,43 +0,0 @@
-/*
- *   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    custom_realloc.h
- * \author  Ioannis Koutras (joko@microlab.ntua.gr)
- * \date    November, 2011
- * \brief   Function prototype of realloc for the dmmlib allocator.
- */
-
-#ifndef CUSTOM_REALLOC_H
-#define CUSTOM_REALLOC_H
-#include "dmm_config.h"
-#include <dmmlib/dmmlib.h>
-#include <dmmlib/pool.h>
-
-/**
- * Try to change the size of an allocation on a specific allocator and heap
- *
- * \param allocator 	The pointer to the allocator who manages the block.
- * \param raw_block     The pointer to the raw block who manages the block.
- * \param ptr 		The pointer to the data part of the original memory block.
- * \param size 		The new desired size of the block.
- *
- * \return 		The pointer to the data part of the memory block which
- * has the new, desired size.
- */ 
-void * custom_ahrealloc(allocator_t *allocator, raw_block_header_t *raw_block, void *ptr, size_t size);
-
-#endif /* CUSTOM_REALLOC_H */

+ 0 - 53
include/dmmlib/initialize_allocator.h

@@ -1,53 +0,0 @@
-/*
- *   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 	initialize_allocator.h
- * \author 	Ioannis Koutras (joko@microlab.ntua.gr)
- * \date 	September, 2011
- * \brief 	dmmlib allocator initializator.
- */
-
-#ifndef INITIALIZE_ALLOCATOR_H
-#define INITIALIZE_ALLOCATOR_H
-
-#include <dmmlib/heap.h>
-#include "dmm_config.h"
-
-#ifdef NO_SYSTEM_CALLS
-/**
- * Initialize an allocator. Since no system calls can be made, the developer
- * has to define explicitly the memory space the allocator will manage.
- *
- * \param allocator The address of the allocator.
- * \param starting_address The starting addres of the memory space which the
- * allocator has to handle.
- * \param size The total size of the memory space which the allocator has to
- * handle.
- */
-void initialize_allocator(allocator_t *allocator, void *starting_address,
-  size_t size);
-#else /* NO_SYSTEM_CALLS */
-/**
- * Initialize an allocator.
- *
- * \param allocator The address of the allocator.
- */
-void initialize_allocator(allocator_t *allocator);
-#endif /* NO_SYSTEM_CALLS */
-
-#endif /* INITIALIZE_ALLOCATOR_H */

+ 0 - 34
private-include/dmm_adaptor.h

@@ -1,34 +0,0 @@
-/*
- *   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.
- *
- */
-
-#ifndef DMM_ADAPTOR_H
-#define DMM_ADAPTOR_H
-
-#include <dmmlib/heap.h>
-
-void set_frag_params(heap_t *heap);
-void set_foot_params(heap_t *heap);
-
-void update_frag_params(heap_t *heap);
-void update_foot_params(heap_t *heap);
-
-float get_current_fragmentation(heap_t *heap);
-void check_footprint(heap_t *heap);
-void malloc_state_refresh(heap_t *heap);
-void free_state_refresh(heap_t *heap);
-
-#endif /* DMM_ADAPTOR_H */

+ 0 - 128
src/dmm_adaptor.c

@@ -1,128 +0,0 @@
-/*
- *   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.
- *
- */
-
-#include "dmm_adaptor.h"
-
-void update_frag_params(heap_t *heap) {
-    switch(heap->dmm_knobs.frag_state) {
-        default :
-            heap->dmm_knobs.percentage = 0;
-            heap->dmm_knobs.max_coalesce_size = (size_t) -1;
-            heap->dmm_knobs.min_split_size = 0;
-            heap->dmm_knobs.empty_threshold = 1.5;
-            break;
-        case 1 :
-            heap->dmm_knobs.percentage = 20;
-            heap->dmm_knobs.max_coalesce_size = 400;
-            heap->dmm_knobs.min_split_size = 1200;
-            break;
-        case 2 :
-            heap->dmm_knobs.percentage = 40;
-            heap->dmm_knobs.max_coalesce_size = 800;
-            heap->dmm_knobs.min_split_size = 1000;
-            break;
-        case 3 :
-            heap->dmm_knobs.percentage = 60;
-            heap->dmm_knobs.max_coalesce_size = 1200;
-            heap->dmm_knobs.min_split_size = 800;
-            break;
-        case 4 :
-            heap->dmm_knobs.percentage = 80;
-            heap->dmm_knobs.max_coalesce_size = 1600;
-            heap->dmm_knobs.min_split_size = 600;
-            break;
-        case 5 :
-            heap->dmm_knobs.percentage = 100;
-            heap->dmm_knobs.max_coalesce_size = 2000;
-            heap->dmm_knobs.min_split_size = 300;
-            break;
-    }
-}
-
-void update_foot_params(heap_t *heap) {
-    switch(heap->dmm_knobs.foot_state) {
-        default :
-            heap->dmm_knobs.empty_threshold = 0.8f;
-            break;
-        case 2 :
-            heap->dmm_knobs.empty_threshold = 0.6f;
-            break;
-        case 3 :
-            heap->dmm_knobs.empty_threshold = 0.4f;
-            break;
-        case 4 :
-            heap->dmm_knobs.empty_threshold = 0.2f;
-            break;
-        case 5 :
-            heap->dmm_knobs.empty_threshold = 0.0f;
-            break;
-    }
-}
-
-float get_current_fragmentation(heap_t *heap) {
-    float fragmentation;
-
-    fragmentation = (float) heap->dmm_stats.mem_allocated / 
-        (float)	heap->dmm_stats.mem_requested - 1.0f;
-
-    if(fragmentation <= MIN_FRAG_THRESHOLD &&
-            heap->dmm_stats.mem_allocated < heap->dmm_knobs.mem_threshold) {
-        heap->dmm_knobs.frag_state = 0;
-        heap->dmm_knobs.foot_state = 0;
-        update_frag_params(heap);
-    }
-
-    return fragmentation;
-}
-
-void check_footprint(heap_t *heap) {
-    if(heap->dmm_stats.mem_allocated > heap->dmm_knobs.mem_threshold) {
-        if(heap->dmm_knobs.frag_state > heap->dmm_knobs.foot_state) {
-            heap->dmm_knobs.foot_state = heap->dmm_knobs.frag_state;
-        } else {
-            heap->dmm_knobs.foot_state++;
-        }
-        update_foot_params(heap);
-    }
-}
-
-void malloc_state_refresh(heap_t *heap) {
-    float fragmentation;
-
-    fragmentation = get_current_fragmentation(heap); 
-
-    /* Check fragmentation */
-    if(fragmentation >= heap->dmm_knobs.frag_threshold &&
-            heap->dmm_stats.mem_requested != 0) {
-        if(heap->dmm_knobs.foot_state > heap->dmm_knobs.frag_state) {
-            heap->dmm_knobs.frag_state = heap->dmm_knobs.foot_state;
-        } else {
-            heap->dmm_knobs.frag_state++;
-        }
-        update_frag_params(heap);
-    }
-
-    check_footprint(heap);
-}
-
-void free_state_refresh(heap_t *heap) {
-    float fragmentation;
-
-    fragmentation = get_current_fragmentation(heap);
-
-    check_footprint(heap);
-}