|
LMMP 4.3.0
Lamina High-Precision Arithmetic Library
|
#include "lmmp/lmmp.h"#include "lmmp/lmmpn.h"#include "lmmp/numth.h"#include "cases.h"#include <stdatomic.h>#include <stdlib.h>#include <string.h>#include <windows.h>#include <process.h>结构体 | |
| struct | thread_case |
枚举 | |
| enum | { BIG_N = 64 , DECIMAL_CAP = 20 * BIG_N + 8 , FACTORIAL_N = 65537 } |
| Copyright (C) 2026 HJimmyK (Jericho Knox) 更多... | |
函数 | |
| static mp_size_t | big_to_decimal (mp_byte_t *out, mp_srcptr a) |
| static void * | count_alloc (size_t n) |
| static void | count_free (void *p) |
| static void * | count_realloc (void *p, size_t n) |
| static mp_ptr | factorial_buffer (mp_size_t n) |
| static void | fill_big (mp_ptr a) |
| static void | test_fn_heap_balance_full_cycle (void) |
| static void | test_fn_lifecycle_idempotent (void) |
| static void | test_fn_thread_isolation (void) |
| void | test_lifecycle (void) |
| Copyright (C) 2026 HJimmyK (Jericho Knox) | |
| static unsigned __stdcall | thread_worker (void *arg) |
变量 | |
| static atomic_long | live_allocations |
| struct thread_case |
在文件 test_lifecycle.c 第 147 行定义.
| 成员变量 | ||
|---|---|---|
| mp_bitcnt_t | bits | |
| const mp_byte_t * | decimal | |
| mp_srcptr | input | |
| mp_size_t | len | |
| bool | pass | |
| mp_size_t | rn | |
| anonymous enum |
Copyright (C) 2026 HJimmyK (Jericho Knox)
This file is part of LMMP.
LMMP is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library. If not, see https://www.gnu.org/licenses/.
SPDX-License-Identifier: LGPL-3.0-or-later
| 枚举值 | ||
|---|---|---|
| BIG_N | 64 | |
| DECIMAL_CAP | 20 * BIG_N + 8 | |
| FACTORIAL_N | 65537 | |
在文件 test_lifecycle.c 第 46 行定义.
在文件 test_lifecycle.c 第 54 行定义.
引用了 BIG_N, big_to_decimal() , 以及 lmmp_to_str_().
被这些函数引用 big_to_decimal(), test_fn_heap_balance_full_cycle(), test_fn_lifecycle_idempotent(), test_fn_thread_isolation() , 以及 thread_worker().
|
static |
在文件 test_lifecycle.c 第 102 行定义.
引用了 count_alloc(), live_allocations , 以及 n.
被这些函数引用 count_alloc(), count_realloc() , 以及 test_fn_heap_balance_full_cycle().
|
static |
在文件 test_lifecycle.c 第 109 行定义.
引用了 count_free() , 以及 live_allocations.
被这些函数引用 count_free() , 以及 test_fn_heap_balance_full_cycle().
|
static |
在文件 test_lifecycle.c 第 115 行定义.
引用了 count_alloc(), count_realloc() , 以及 n.
被这些函数引用 count_realloc() , 以及 test_fn_heap_balance_full_cycle().
在文件 test_lifecycle.c 第 58 行定义.
引用了 factorial_buffer() , 以及 n.
被这些函数引用 factorial_buffer(), test_fn_heap_balance_full_cycle(), test_fn_lifecycle_idempotent() , 以及 thread_worker().
|
static |
在文件 test_lifecycle.c 第 48 行定义.
引用了 BIG_N , 以及 fill_big().
被这些函数引用 fill_big(), test_fn_heap_balance_full_cycle(), test_fn_lifecycle_idempotent() , 以及 test_fn_thread_isolation().
|
static |
在文件 test_lifecycle.c 第 119 行定义.
引用了 BIG_N, big_to_decimal(), count_alloc(), count_free(), count_realloc(), DECIMAL_CAP, factorial_buffer(), FACTORIAL_N, fill_big(), live_allocations, lmmp_factorial_(), lmmp_factorial_size_(), lmmp_global_deinit(), lmmp_global_init(), lmmp_mul_(), lmmp_set_heap_allocator(), TEST_CASE , 以及 TEST_CHECK.
|
static |
在文件 test_lifecycle.c 第 65 行定义.
引用了 BIG_N, big_to_decimal(), DECIMAL_CAP, factorial_buffer(), FACTORIAL_N, fill_big(), lmmp_factorial_(), lmmp_factorial_size_(), lmmp_global_deinit(), lmmp_global_init(), lmmp_mul_(), TEST_CASE , 以及 TEST_CHECK.
|
static |
在文件 test_lifecycle.c 第 177 行定义.
引用了 BIG_N, big_to_decimal(), DECIMAL_CAP, FACTORIAL_N, fill_big(), lmmp_factorial_size_(), TEST_CASE, TEST_CHECK, TEST_CHECK_EQ, TEST_CHECK_MSG , 以及 thread_worker().
| void test_lifecycle | ( | void | ) |
Copyright (C) 2026 HJimmyK (Jericho Knox)
This file is part of LMMP.
LMMP is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library. If not, see https://www.gnu.org/licenses/.
SPDX-License-Identifier: LGPL-3.0-or-later
在文件 test_lifecycle.c 第 222 行定义.
引用了 test_lifecycle() , 以及 TEST_RUN.
被这些函数引用 main() , 以及 test_lifecycle().
|
static |
在文件 test_lifecycle.c 第 156 行定义.
引用了 big_to_decimal(), thread_case::bits, thread_case::decimal, DECIMAL_CAP, factorial_buffer(), FACTORIAL_N, thread_case::input, thread_case::len, lmmp_factorial_(), lmmp_factorial_size_(), lmmp_global_deinit(), lmmp_global_init(), thread_case::pass, thread_case::rn , 以及 thread_worker().
被这些函数引用 test_fn_thread_isolation() , 以及 thread_worker().
|
static |
在文件 test_lifecycle.c 第 100 行定义.
被这些函数引用 count_alloc(), count_free() , 以及 test_fn_heap_balance_full_cycle().