mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
27 lines
522 B
C
27 lines
522 B
C
#include "gtest/gtest.h"
|
|
|
|
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
|
|
|
|
int main(int argc, char** argv) {
|
|
#if use_dynamic_pool
|
|
pikaPool = pool_init(1024 * 8, 8);
|
|
#endif
|
|
::testing::InitGoogleTest(&argc, argv);
|
|
return RUN_ALL_TESTS();
|
|
}
|