|
5fa8cda9
|
2014-06-30T12:05:25
|
|
Round up pool alloc sizes for alignment
To make sure that items returned from pool allocations are aligned
on nice boundaries, this rounds up all pool allocation sizes to a
multiple of 8. This adds a small amount of overhead to each item.
The rounding up could be made optional with an extra parameter to
the pool initialization that turned on rounding only for pools
where item alignment actually matters, but I think for the extra
code and complexity that would be involved, that it makes sense
just to burn a little bit of extra memory and enable this all the
time.
|
|
7a16d54b
|
2013-12-13T12:47:51
|
|
pool: Agh, this test doesn't really apply in 32-bit machines
The size_t is 32-bit already, so it overflows before going into the
function. The `-1` test should handle this gracefully in both cases
anyway.
|
|
437f7d69
|
2013-12-13T12:41:22
|
|
pool: Correct overflow checks
Ok, scrap the previous commit. This is the right overflow check that
takes care of 64 bit overflow **and** 32-bit overflow, which needs to be
considered because the pool malloc can only allocate 32-bit elements in
one go.
|
|
17820381
|
2013-11-14T14:05:52
|
|
Rename tests-clar to tests
|