2021-10-01 00:21:50 +08:00
|
|
|
#include "gtest/gtest.h"
|
|
|
|
|
2021-11-16 16:25:22 +08:00
|
|
|
extern "C" {
|
|
|
|
#include "dataMemory.h"
|
|
|
|
}
|
|
|
|
|
|
|
|
#define use_dynamic_pool 1
|
|
|
|
/* use mem pool */
|
|
|
|
#if use_dynamic_pool
|
|
|
|
Pool pikaPool;
|
|
|
|
void* __impl_pikaMalloc(size_t size) {
|
|
|
|
void* mem = pool_malloc(&pikaPool, size);
|
|
|
|
return mem;
|
|
|
|
}
|
|
|
|
void __impl_pikaFree(void* ptrm, size_t size) {
|
|
|
|
pool_free(&pikaPool, ptrm, size);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2021-10-01 00:21:50 +08:00
|
|
|
int main(int argc, char** argv) {
|
2021-11-16 16:25:22 +08:00
|
|
|
#if use_dynamic_pool
|
|
|
|
pikaPool = pool_init(0x1B00, 4);
|
|
|
|
#endif
|
|
|
|
::testing::InitGoogleTest(&argc, argv);
|
|
|
|
return RUN_ALL_TESTS();
|
2021-10-01 00:21:50 +08:00
|
|
|
}
|