
28 Aug
2012
28 Aug
'12
2:18 a.m.
Hi Tomas,
Another small correction...
On Tue, Aug 28, 2012 at 9:02 AM, Graeme Russ graeme.russ@gmail.com wrote:
static struct early_heap_header *def_early_brk(size_t bytes) { struct early_heap_header *h;
if(gd->early_heap_first) return NULL; /* The default implementation allocates all of the reserved space */
if (bytes > (CONFIG_SYS_EARLY_HEAP_SIZE - roundup(sizeof(struct early_heap_header), sizeof(phys_addr_t)) return NULL;
bytes = CONFIG_SYS_EARLY_HEAP_SIZE; gd->early_heap_first = bytes; h = gd->early_heap_first; h->free_space_pointer = (void *)(roundup((phys_addr_t)h + sizeof(struct early_heap_header), sizeof(phys_addr_t))); h->free_bytes = bytes - roundup(sizeof(struct early_heap_header), sizeof(phys_addr_t)); h->next_early_heap = NULL; return h;
}
Regards,
Graeme