diff options
Diffstat (limited to 'testsuites/support')
-rw-r--r-- | testsuites/support/include/test_support.h | 18 | ||||
-rw-r--r-- | testsuites/support/src/test_support.c | 39 |
2 files changed, 0 insertions, 57 deletions
diff --git a/testsuites/support/include/test_support.h b/testsuites/support/include/test_support.h index f478067c43..5317113197 100644 --- a/testsuites/support/include/test_support.h +++ b/testsuites/support/include/test_support.h @@ -17,24 +17,6 @@ extern "C" { #endif /* - * Allocate a number of small blocks from the workspace - * until the largest free block of memory available is - * smaller than smallest. - * - * NOTE: The memory CANNOT be freed. - */ -void Allocate_majority_of_workspace( int smallest ); - -/* - * Allocate a number of small blocks from the heap - * until the largest free block of memory available is - * smaller than smallest. - * - * NOTE: The memory CANNOT be freed. - */ -void Allocate_majority_of_heap( int smallest ); - -/* * Return a pointer to the POSIX name that is slightly * beyond the legal limit. */ diff --git a/testsuites/support/src/test_support.c b/testsuites/support/src/test_support.c index 757f7b38c6..207434b8c6 100644 --- a/testsuites/support/src/test_support.c +++ b/testsuites/support/src/test_support.c @@ -40,42 +40,3 @@ const char *Get_Longest_Name(void) Longest_Name[i] = '\0'; return Longest_Name; } - -void Allocate_majority_of_workspace( int smallest ) -{ - bool result; - Heap_Information_block info; - void *temp; - - puts("Allocate_majority_of_workspace: "); - result = rtems_workspace_get_information( &info ); - if ( result != TRUE ) - perror("==> Error Getting workspace information"); - - do { - result = rtems_workspace_allocate( - info.Free.largest - HEAP_BLOCK_HEADER_SIZE, - &temp - ); - if ((!result) || (!temp)) - perror("Unable to allocate from workspace"); - result = rtems_workspace_get_information( &info ); - } while ( info.Free.largest >= smallest ); - -} - -void Allocate_majority_of_heap( int smallest ) -{ - size_t size; - void *temp; - - puts("Allocate_majority_of_heap: "); - size = malloc_free_space(); - do { - temp = malloc( size - HEAP_BLOCK_HEADER_SIZE ); - if (!temp) - perror("Unable to allocate from workspace"); - size = malloc_free_space(); - } while ( size >= smallest ); - -} |