summaryrefslogtreecommitdiffstats
path: root/test/failing_allocator.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/failing_allocator.h')
-rw-r--r--test/failing_allocator.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/failing_allocator.h b/test/failing_allocator.h
index 89bee88..982874d 100644
--- a/test/failing_allocator.h
+++ b/test/failing_allocator.h
@@ -10,11 +10,12 @@
/// An allocator that fails after some number of successes for testing
typedef struct {
- size_t n_allocations; ///< The number of allocations that have been attempted
- size_t n_remaining; ///< The number of remaining successful allocations
-} ZixFailingAllocatorState;
+ ZixAllocator base; ///< Base allocator instance
+ size_t n_allocations; ///< Number of attempted allocations
+ size_t n_remaining; ///< Number of remaining successful allocations
+} ZixFailingAllocator;
-ZixAllocator
-zix_failing_allocator(ZixFailingAllocatorState* state);
+ZixFailingAllocator
+zix_failing_allocator(void);
#endif // ZIX_FAILING_ALLOCATOR_H