macro-fundamental: add U64_{K,M,G}B

This commit is contained in:
Mike Yuan
2023-12-13 19:25:40 +08:00
parent ba354c164f
commit 55b8f8100c
2 changed files with 4 additions and 4 deletions

View File

@@ -158,6 +158,10 @@
__atomic_exchange_n(&(o), true, __ATOMIC_SEQ_CST); \
})
#define U64_KB UINT64_C(1024)
#define U64_MB (UINT64_C(1024) * U64_KB)
#define U64_GB (UINT64_C(1024) * U64_MB)
#undef MAX
#define MAX(a, b) __MAX(UNIQ, (a), UNIQ, (b))
#define __MAX(aq, a, bq, b) \

View File

@@ -47,10 +47,6 @@
#define DEFAULT_COMPRESS_THRESHOLD (512ULL)
#define MIN_COMPRESS_THRESHOLD (8ULL)
#define U64_KB UINT64_C(1024)
#define U64_MB (UINT64_C(1024) * U64_KB)
#define U64_GB (UINT64_C(1024) * U64_MB)
/* This is the minimum journal file size */
#define JOURNAL_FILE_SIZE_MIN (512 * U64_KB) /* 512 KiB */
#define JOURNAL_COMPACT_SIZE_MAX ((uint64_t) UINT32_MAX) /* 4 GiB */