[U-Boot] Early malloc() summary

Marek Vasut marex at denx.de
Wed Aug 15 01:56:32 CEST 2012


Dear Graeme Russ,

[...]

> 
> Third path is dm_malloc() - Although ugly, it has a few nicities...

Thinking about dm_malloc() ... if it's entirely different, the semantics can be 
adjusted too ... say to "int dm_malloc(void **ptr, size_t size);":

- return int: error code
- **ptr: pointer to allocated memory, that way we can possibly implement pointer 
tracking (of course that'd need more work, might be a debug feature)
- size: size of allocated area

Of course that'd need -- in case you'd copy pointers -- another function to do 
so. etc etc.

[...]

off and out.

Best regards,
Marek Vasut


More information about the U-Boot mailing list