From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 15 Aug 2012 01:56:32 +0200 Subject: [U-Boot] Early malloc() summary In-Reply-To: References: <201208141437.29415.marex@denx.de> Message-ID: <201208150156.32843.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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