Hoard 中的 is/does `bool c2s(int)` 是什么?
What is/does `bool c2s(int)` in Hoard?
在 source of geometricsizeclass.cpp of Hoard (the memory allocator) 中有一个未定义的函数 bool c2s(int)
。
它是什么,有什么作用?
我正在尝试将 hoard 编译为 VS2019 中的库,忽略 Makefile。
在头文件中是there:
/// Quickly compute the maximum size for a given size class.
static unsigned long c2s (int cl) {
static size_t sizes[NUM_SIZECLASSES];
static bool init = createTable ((size_t *) sizes);
init = init;
return sizes[cl];
}
在 source of geometricsizeclass.cpp of Hoard (the memory allocator) 中有一个未定义的函数 bool c2s(int)
。
它是什么,有什么作用?
我正在尝试将 hoard 编译为 VS2019 中的库,忽略 Makefile。
在头文件中是there:
/// Quickly compute the maximum size for a given size class.
static unsigned long c2s (int cl) {
static size_t sizes[NUM_SIZECLASSES];
static bool init = createTable ((size_t *) sizes);
init = init;
return sizes[cl];
}