UDB_ALLOC_CHUNK_SIZE
grow_align(base, alloc, UDB_ALLOC_CHUNK_SIZE);
uint64_t need=(asz+UDB_ALLOC_CHUNK_SIZE-1)&(~(UDB_ALLOC_CHUNK_SIZE-1));
if(asz > UDB_ALLOC_CHUNK_SIZE) {
udb_void q = s + m - UDB_ALLOC_CHUNK_SIZE;
assert(s >= UDB_ALLOC_CHUNK_SIZE);
q -= UDB_ALLOC_CHUNK_SIZE;
uint64_t seg, maxseg = amount/UDB_ALLOC_CHUNK_SIZE;
memcpy(np+seg*UDB_ALLOC_CHUNK_SIZE,
xlp+seg*UDB_ALLOC_CHUNK_SIZE,
UDB_ALLOC_CHUNK_SIZE);
assert( (xl_start&(UDB_ALLOC_CHUNK_SIZE-1)) == 0 ); /* aligned */
assert( (amount&(UDB_ALLOC_CHUNK_SIZE-1)) == 0 ); /* multiples */
assert( (xl_sz&(UDB_ALLOC_CHUNK_SIZE-1)) == 0 ); /* multiples */
udb_void chunk = at - UDB_ALLOC_CHUNK_SIZE;
m += UDB_ALLOC_CHUNK_SIZE;
assert( (xlsz & (UDB_ALLOC_CHUNK_SIZE-1)) == 0 ); /* whole mbs */
assert( (f & (UDB_ALLOC_CHUNK_SIZE-1)) == 0 ); /* aligned */
c = f + xlsz - UDB_ALLOC_CHUNK_SIZE;
assert(f >= UDB_ALLOC_CHUNK_SIZE);
c -= UDB_ALLOC_CHUNK_SIZE;
if( (xl & (UDB_ALLOC_CHUNK_SIZE-1)) == 0)
if( (xlsz&(UDB_ALLOC_CHUNK_SIZE-1)) != 0) {
if( (c&(UDB_ALLOC_CHUNK_SIZE-1)) != 0) {
udb_void q = s + m - UDB_ALLOC_CHUNK_SIZE;
assert(s >= UDB_ALLOC_CHUNK_SIZE);
q -= UDB_ALLOC_CHUNK_SIZE;
if( (rb_size&(UDB_ALLOC_CHUNK_SIZE-1)) != 0)
if( (rb_old&(UDB_ALLOC_CHUNK_SIZE-1)) != 0)
if( (rb_new&(UDB_ALLOC_CHUNK_SIZE-1)) != 0)