diff options
Diffstat (limited to 'pkmem.h')
| -rw-r--r-- | pkmem.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -226,6 +226,9 @@ pk_mem_bucket_create(const char* description, int64_t sz, enum PK_MEMBUCKET_FLAG // [000-127] pk_membucket // [128-191] 64 bytes of data LOL // [192-511] 20 pk_memblocks (20 is worst-case, start 16, 4 per 64 bytes) + if ((sz % 64) > 0) { + sz += 64 - (sz % 64); + } assert(sz >= 512 && "[pkmem.h] bucket too small to track allocation data"); struct pk_membucket* bkt = (struct pk_membucket*)aligned_alloc(64, sz); if (bkt == NULL) return NULL; |
