diff --git a/src/partition_allocator/partition_allocator.c b/src/partition_allocator/partition_allocator.c index 92ba92667d75e5bd3fdab5517d24086e4d18b137..ab7feeaa6c21b9eea4fd7ed4a384ccf430cf8de9 100644 --- a/src/partition_allocator/partition_allocator.c +++ b/src/partition_allocator/partition_allocator.c @@ -1412,10 +1412,21 @@ int allocate_part(pa_request_t* pa_request, List* results) #endif // _backup_pa_system(); - if (!_find_first_match(pa_request, results)) + if (!_find_first_match(pa_request, results)){ + ListIterator itr = list_iterator_create(*results); + pa_node_t* pa_node; + while((pa_node = list_next(itr))){ + pa_node->used = true; + } + + /** THIS IS where we might should call the graph + * solver to see if the allocation can be wired, + * before returning a definitive TRUE */ + return 1; - else + } else { return 0; + } } /** @@ -1578,6 +1589,9 @@ int main(int argc, char** argv) } else { printf("request failed\n"); } + + results = list_create(NULL); + allocate_part(request, &results); // time(&end); // printf("allocate: %ld\n", (end-start));