diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-06-27 01:25:41 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-06-27 01:25:41 +0200 |
| commit | 5de25aaac2358494469605ace1685307d294bdbf (patch) | |
| tree | 5f386f3d2ad8d3f9907a4d459d7e3462d334600c /src/benchmarks | |
| parent | 23e77009bb8da35e2285c3a8f5913c192f9e009f (diff) | |
| download | allocbench-5de25aaac2358494469605ace1685307d294bdbf.tar.gz allocbench-5de25aaac2358494469605ace1685307d294bdbf.zip | |
fix realloc micro benchmark for allocators returning null for realloc(ptr, 0)
Diffstat (limited to 'src/benchmarks')
| -rw-r--r-- | src/benchmarks/realloc/realloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/benchmarks/realloc/realloc.c b/src/benchmarks/realloc/realloc.c index 2eddc26..b6e6034 100644 --- a/src/benchmarks/realloc/realloc.c +++ b/src/benchmarks/realloc/realloc.c @@ -4,7 +4,7 @@ size_t* array; size_t steps = 1; int main() { - for (int i = 0; i < 100; i++) { + for (int i = 1; i < 100; i++) { if ((array = realloc(array, sizeof(size_t) * steps * i)) == NULL) { perror("realloc"); return 1; |
