/*
- * arch/ppc/syslib/rheap.c
- *
* A Remote Heap. Remote means that we don't touch the memory that the
* heap points to. Normal heap implementations use the memory they manage
* to place their list. We cannot do that because the memory we manage may
/* Grow the after block backwards */
if (before == NULL && after != NULL) {
- (int8_t *) after->start -= size;
+ after->start = (int8_t *)after->start - size;
after->size += size;
return;
}
/* blk still in free list, with updated start and/or size */
if (bs == s || be == e) {
if (bs == s)
- (int8_t *) blk->start += size;
+ blk->start = (int8_t *)blk->start + size;
blk->size -= size;
} else {
newblk->owner = owner;
/* blk still in free list, with updated start, size */
- (int8_t *) blk->start += size;
+ blk->start = (int8_t *)blk->start + size;
blk->size -= size;
start = newblk->start;
/* blk still in free list, with updated start and/or size */
if (bs == s || be == e) {
if (bs == s)
- (int8_t *) blk->start += size;
+ blk->start = (int8_t *)blk->start + size;
blk->size -= size;
} else {
return -EINVAL;
blk->owner = owner;
+ size = blk->size;
return size;
}