mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
memtype-managed: calculate block lengths correctly
This commit is contained in:
parent
78f5a3f818
commit
c749821b8d
1 changed files with 1 additions and 1 deletions
|
@ -132,7 +132,7 @@ void* memory_managed_alloc(struct memtype *m, size_t len, size_t alignment)
|
|||
* The original block descriptor is already at the correct
|
||||
* position, so we just change its len and create a new block
|
||||
* descriptor for the actual block we're handling. */
|
||||
block->len = gap;
|
||||
block->len = gap - sizeof(struct memblock);
|
||||
struct memblock *newblock = (struct memblock*) (cptr - sizeof(struct memblock));
|
||||
newblock->prev = block;
|
||||
newblock->next = block->next;
|
||||
|
|
Loading…
Add table
Reference in a new issue