mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:27:45 +00:00
LibC: Expose PAGE_ROUND_UP in mallocdefs.h
This commit is contained in:
parent
c93f73c617
commit
6fb08f20e3
2 changed files with 2 additions and 2 deletions
|
@ -24,8 +24,6 @@
|
||||||
|
|
||||||
#define RECYCLE_BIG_ALLOCATIONS
|
#define RECYCLE_BIG_ALLOCATIONS
|
||||||
|
|
||||||
#define PAGE_ROUND_UP(x) ((((size_t)(x)) + PAGE_SIZE - 1) & (~(PAGE_SIZE - 1)))
|
|
||||||
|
|
||||||
static Threading::Lock& malloc_lock()
|
static Threading::Lock& malloc_lock()
|
||||||
{
|
{
|
||||||
static u32 lock_storage[sizeof(Threading::Lock) / sizeof(u32)];
|
static u32 lock_storage[sizeof(Threading::Lock) / sizeof(u32)];
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
#define MALLOC_SCRUB_BYTE 0xdc
|
#define MALLOC_SCRUB_BYTE 0xdc
|
||||||
#define FREE_SCRUB_BYTE 0xed
|
#define FREE_SCRUB_BYTE 0xed
|
||||||
|
|
||||||
|
#define PAGE_ROUND_UP(x) ((((size_t)(x)) + PAGE_SIZE - 1) & (~(PAGE_SIZE - 1)))
|
||||||
|
|
||||||
static constexpr unsigned short size_classes[] = { 8, 16, 32, 64, 128, 256, 504, 1016, 2032, 4088, 8184, 16376, 32752, 0 };
|
static constexpr unsigned short size_classes[] = { 8, 16, 32, 64, 128, 256, 504, 1016, 2032, 4088, 8184, 16376, 32752, 0 };
|
||||||
static constexpr size_t num_size_classes = (sizeof(size_classes) / sizeof(unsigned short)) - 1;
|
static constexpr size_t num_size_classes = (sizeof(size_classes) / sizeof(unsigned short)) - 1;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue