mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
ealanos: Let larson benchmark check if allocated memory is in canonical address space.
This commit is contained in:
@@ -393,7 +393,8 @@ void runloops(long sleep_cnt, int num_chunks )
|
|||||||
blkp[cblks] = (char *) CUSTOM_MALLOC(blk_size) ;
|
blkp[cblks] = (char *) CUSTOM_MALLOC(blk_size) ;
|
||||||
#endif
|
#endif
|
||||||
blksize[cblks] = blk_size ;
|
blksize[cblks] = blk_size ;
|
||||||
assert(blkp[cblks] != NULL) ;
|
assert(blkp[cblks] != NULL);
|
||||||
|
assert(blkp[cblks] < (void *)0x7FFF80000000UL);
|
||||||
}
|
}
|
||||||
|
|
||||||
while(TRUE){
|
while(TRUE){
|
||||||
@@ -633,22 +634,22 @@ static void * exercise_heap( void *pinput)
|
|||||||
pdea->array[victim] = new char[blk_size] ;
|
pdea->array[victim] = new char[blk_size] ;
|
||||||
#else
|
#else
|
||||||
pdea->array[victim] = (char *) CUSTOM_MALLOC(blk_size) ;
|
pdea->array[victim] = (char *) CUSTOM_MALLOC(blk_size) ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pdea->blksize[victim] = blk_size ;
|
pdea->blksize[victim] = blk_size ;
|
||||||
assert(pdea->array[victim] != NULL) ;
|
assert(pdea->array[victim] != NULL);
|
||||||
|
assert(pdea->array[victim] < (void*)0x7FFF80000000UL);
|
||||||
|
|
||||||
pdea->cAllocs++ ;
|
pdea->cAllocs++;
|
||||||
|
|
||||||
/* Write something! */
|
/* Write something! */
|
||||||
|
|
||||||
volatile char * chptr = ((char *) pdea->array[victim]);
|
volatile char *chptr = ((char *)pdea->array[victim]);
|
||||||
*chptr++ = 'a';
|
*chptr++ = 'a';
|
||||||
[[maybe_unused]] volatile char ch = *((char *) pdea->array[victim]);
|
[[maybe_unused]] volatile char ch = *((char *)pdea->array[victim]);
|
||||||
*chptr = 'b';
|
*chptr = 'b';
|
||||||
|
|
||||||
|
if (stopflag) break;
|
||||||
if( stopflag ) break ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// printf("Thread %u terminating: %d allocs, %d frees\n",
|
// printf("Thread %u terminating: %d allocs, %d frees\n",
|
||||||
@@ -784,7 +785,7 @@ void Libc::Component::construct(Libc::Env &env)
|
|||||||
min_size = config.attribute_value("min_size", 8);
|
min_size = config.attribute_value("min_size", 8);
|
||||||
max_size = config.attribute_value("max_size", 1000);
|
max_size = config.attribute_value("max_size", 1000);
|
||||||
chperthread = config.attribute_value("chperthread", 5000);
|
chperthread = config.attribute_value("chperthread", 5000);
|
||||||
num_rounds = config.attribute_value("rounds", 100);
|
num_rounds = config.attribute_value("rounds", 1000);
|
||||||
seed = config.attribute_value("seed", 4141);
|
seed = config.attribute_value("seed", 4141);
|
||||||
max_threads = config.attribute_value("max_threads", 32);
|
max_threads = config.attribute_value("max_threads", 32);
|
||||||
min_threads = config.attribute_value("min_threads", 1);
|
min_threads = config.attribute_value("min_threads", 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user