mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 15:08:21 +00:00
alloc: add two more cache sizes
This commit is contained in:
@@ -12,11 +12,11 @@
|
|||||||
|
|
||||||
#define USE_POISON 0
|
#define USE_POISON 0
|
||||||
#define POISON_VALUE 0xdeadbeefbadc0ffel
|
#define POISON_VALUE 0xdeadbeefbadc0ffel
|
||||||
#define CACHE_COUNT 12
|
#define CACHE_COUNT 14
|
||||||
|
|
||||||
#define CAPACITY_SIZE(cache) cache->size - sizeof(size_t) * 2 - USE_POISON * sizeof(size_t)
|
#define CAPACITY_SIZE(cache) cache->size - sizeof(size_t) * 2 - USE_POISON * sizeof(size_t)
|
||||||
|
|
||||||
static size_t allocsizes[CACHE_COUNT] = {32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536};
|
static size_t allocsizes[CACHE_COUNT] = {32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144};
|
||||||
static scache_t *caches[CACHE_COUNT + 5];
|
static scache_t *caches[CACHE_COUNT + 5];
|
||||||
|
|
||||||
static void initarea(scache_t *cache, void *obj, size_t size) {
|
static void initarea(scache_t *cache, void *obj, size_t size) {
|
||||||
|
|||||||
Reference in New Issue
Block a user