mirror of
https://github.com/ceph/ceph
synced 2025-02-23 19:17:37 +00:00
rados: Move array to heap. Prevent segfault when you use too-large a write size
This commit is contained in:
parent
ba8aa58197
commit
30a057cf04
@ -159,7 +159,7 @@ int aio_bench(Rados& rados, rados_pool_t pool, int secondsToRun,
|
||||
Rados::AioCompletion* completions[concurrentios];
|
||||
char* name[concurrentios];
|
||||
bufferlist* contents[concurrentios];
|
||||
char contentsChars[writeSize];
|
||||
char* contentsChars = new char[writeSize];
|
||||
double totalLatency = 0;
|
||||
double minLatency=9999.0; // this better be higher than initial latency!
|
||||
double maxLatency=0;
|
||||
@ -331,6 +331,7 @@ int aio_bench(Rados& rados, rados_pool_t pool, int secondsToRun,
|
||||
|
||||
pthread_join(print_thread, NULL);
|
||||
|
||||
delete contentsChars;
|
||||
delete data;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user