Expand data size utilities
This commit is contained in:
@@ -9,10 +9,19 @@
|
||||
BEGIN_C_LINKAGE
|
||||
#endif // !WAPP_PLATFORM_CPP
|
||||
|
||||
#define KB(SIZE) (SIZE * 1024ull)
|
||||
#define MB(SIZE) (KB(SIZE) * 1024)
|
||||
#define GB(SIZE) (MB(SIZE) * 1024)
|
||||
#define TB(SIZE) (GB(SIZE) * 1024)
|
||||
#define KiB(SIZE) (((u64)SIZE) << 10)
|
||||
#define MiB(SIZE) (((u64)SIZE) << 20)
|
||||
#define GiB(SIZE) (((u64)SIZE) << 30)
|
||||
#define TiB(SIZE) (((u64)SIZE) << 40)
|
||||
#define PiB(SIZE) (((u64)SIZE) << 50)
|
||||
#define EiB(SIZE) (((u64)SIZE) << 60)
|
||||
|
||||
#define KB(SIZE) (((u64)SIZE) * 1000llu)
|
||||
#define MB(SIZE) (KB(SIZE) * 1000llu)
|
||||
#define GB(SIZE) (MB(SIZE) * 1000llu)
|
||||
#define TB(SIZE) (GB(SIZE) * 1000llu)
|
||||
#define PB(SIZE) (TB(SIZE) * 1000llu)
|
||||
#define EB(SIZE) (PB(SIZE) * 1000llu)
|
||||
|
||||
#define wapp_misc_utils_padding_size(SIZE) u8 reserved_padding[sizeof(void *) - ((SIZE) % sizeof(void *))]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user