diff options
author | leochanj105 <leochanj@live.unc.edu> | 2020-10-23 02:12:49 -0400 |
---|---|---|
committer | leochanj105 <leochanj@live.unc.edu> | 2020-10-23 02:12:49 -0400 |
commit | e23e931be4776b89149fdb2596f47096e6cdb78c (patch) | |
tree | faf3963cc501f103cd2554553ec74ce21157b42e /all_pairs/source/anagram | |
parent | e2d933df44b7b387b41c8c7805393ad3857c4448 (diff) | |
parent | e0217a963c6c0e0667d41d075038685956bcfacf (diff) |
Merge branch 'sd-vbs' of ssh://rtsrv.cs.unc.edu/public/mc2-scripts-and-benchmarks into sd-vbs
Diffstat (limited to 'all_pairs/source/anagram')
-rw-r--r-- | all_pairs/source/anagram/anagram.c | 6 | ||||
-rw-r--r-- | all_pairs/source/anagram/anagram_stdlib.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/all_pairs/source/anagram/anagram.c b/all_pairs/source/anagram/anagram.c index fc8b6a8..feb9784 100644 --- a/all_pairs/source/anagram/anagram.c +++ b/all_pairs/source/anagram/anagram.c | |||
@@ -305,10 +305,10 @@ void anagram_ReadDict( void ) | |||
305 | _Pragma( "loopbound min 1 max 5" ) | 305 | _Pragma( "loopbound min 1 max 5" ) |
306 | while ( anagram_dictionary[ i ][ strlen ] != 0 ) | 306 | while ( anagram_dictionary[ i ][ strlen ] != 0 ) |
307 | strlen ++; | 307 | strlen ++; |
308 | len += strlen + 2; | 308 | len += strlen + 3; |
309 | } | 309 | } |
310 | 310 | ||
311 | pchBase = anagram_pchDictionary = ( char * )anagram_malloc( len ); | 311 | pchBase = anagram_pchDictionary = ( char * )anagram_malloc( len + 1 ); |
312 | 312 | ||
313 | _Pragma( "loopbound min 2279 max 2279" ) | 313 | _Pragma( "loopbound min 2279 max 2279" ) |
314 | for ( i = 0; i < anagram_DICTWORDS; i ++ ) { | 314 | for ( i = 0; i < anagram_DICTWORDS; i ++ ) { |
@@ -346,7 +346,7 @@ void anagram_init( void ) | |||
346 | int anagram_return( void ) | 346 | int anagram_return( void ) |
347 | { | 347 | { |
348 | int i; | 348 | int i; |
349 | char const *answer = "duke rip amy"; | 349 | char const *answer = "duke yip arm"; |
350 | 350 | ||
351 | for ( i = 0; i < 12; i++ ) | 351 | for ( i = 0; i < 12; i++ ) |
352 | if ( answer[ i ] != anagram_buffer[ i ] ) | 352 | if ( answer[ i ] != anagram_buffer[ i ] ) |
diff --git a/all_pairs/source/anagram/anagram_stdlib.c b/all_pairs/source/anagram/anagram_stdlib.c index c766a5e..5c9f3fc 100644 --- a/all_pairs/source/anagram/anagram_stdlib.c +++ b/all_pairs/source/anagram/anagram_stdlib.c | |||
@@ -126,7 +126,7 @@ void anagram_qsort( void *va, unsigned long n, unsigned long es ) | |||
126 | 126 | ||
127 | 127 | ||
128 | /* This must be redefined for each new benchmark */ | 128 | /* This must be redefined for each new benchmark */ |
129 | #define ANAGRAM_HEAP_SIZE 18000 | 129 | #define ANAGRAM_HEAP_SIZE 20388 |
130 | 130 | ||
131 | static char anagram_simulated_heap[ANAGRAM_HEAP_SIZE]; | 131 | static char anagram_simulated_heap[ANAGRAM_HEAP_SIZE]; |
132 | static unsigned int anagram_freeHeapPos; | 132 | static unsigned int anagram_freeHeapPos; |