Here is a pull request which moves timing primitives into the platform layer & makes system_allocator.c compile with MSVC.
Timing primitive
The implementation is exactly what it was in benchmark.c and got moved to platform_bsdlike.c (TODO included, about using posix timers)
An implementation for win32 is included, using QueryPerformanceCounter
Finally I normalized tabs to spaces in benchmark.c
System Allocator
We also remove some of the void* arithmetics in system_allocator.c, which allow building
with MSVC, and change the system_allocator to store block sizes only when DEBUG__MEMFILL
is enabled.
@thequux you introduced the memfill mechanism, can you have a look at my changes?
String Formatting
Since asprintf/vasprintf do not exist in the C standard, we provide an implementation for win32 inside platform_win32.c
Here is a pull request which moves timing primitives into the platform layer & makes system_allocator.c compile with MSVC.
Timing primitive
The implementation is exactly what it was in benchmark.c and got moved to platform_bsdlike.c (TODO included, about using posix timers)
An implementation for win32 is included, using
QueryPerformanceCounter
Finally I normalized tabs to spaces in benchmark.c
System Allocator
We also remove some of the void* arithmetics in system_allocator.c, which allow building with MSVC, and change the system_allocator to store block sizes only when DEBUG__MEMFILL is enabled.
@thequux you introduced the memfill mechanism, can you have a look at my changes?
String Formatting
Since asprintf/vasprintf do not exist in the C standard, we provide an implementation for win32 inside platform_win32.c