2026-08-22 02:13:04 -05:00
|
|
|
#include "malunal/allocator.h"
|
|
|
|
|
#include "malunal/microtest.h"
|
|
|
|
|
|
|
|
|
|
MICROTEST(platform_allocator, can_acquire_and_dispose) {
|
|
|
|
|
malunal_mptr_t address = null;
|
|
|
|
|
allocator_mptr_t allocator = platform_allocator();
|
|
|
|
|
error_t result = allocator_acquire(allocator, 32, &address);
|
|
|
|
|
MICROTEST_EXPECT_NULL(result.domain);
|
|
|
|
|
MICROTEST_ASSERT_NOT_NULL(address);
|
|
|
|
|
|
|
|
|
|
result = allocator_dispose(allocator, address, 32);
|
|
|
|
|
MICROTEST_EXPECT_NULL(result.domain);
|
2026-08-07 18:33:50 -05:00
|
|
|
}
|