#3582 assigned task

Remove dedicated support for boundary constraint in heap allocator

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 5.1
Component: score Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

Some time ago a dedicated support for a boundary constraint was added to the first fit heap allocator. The use case for this is the libbsd (new network stack) which needs this for the bus space allocator:

https://www.freebsd.org/cgi/man.cgi?query=bus_dma

It turned out that this feature is rarely used. It makes the first fit heap allocator implementation considerably more complex. It is also not a standard allocator feature which makes it more difficult to replace the first fit heap allocator with something else, e.g. TLSF.

The boundary constraint can be also satisfied by an allocator which supports only the alignment constraint via:

if (boundary > alignment) {
	assert(alignment == 0 || boundary % alignment == 0);
	alignment = boundary;
}

Change History (0)

Note: See TracTickets for help on using tickets.