The os_realloc() API

User avatar
kolban
Posts: 131
Joined: Tue Jun 16, 2015 1:09 pm
Location: Fort Worth, Texas, USA

The os_realloc() API

Postby kolban » Tue Sep 01, 2015 12:23 pm

Folks,
There is a rumor that there is an API called "os_realloc()" which would be a partner to "os_malloc()" and "os_free()". See here for a description of realloc().

http://linux.die.net/man/3/realloc

The claim is that os_realloc() is achieved via the following definitions.

#define os_realloc pvPortRealloc
void *pvPortRealloc(void* ptr, size_t size);

The question, of course ... is how valid is this notion? Is it simply that os_realloc() was missed in the docs and headers ... or is it simply not available or shouldn't be used?

Neil

dkinzer
Posts: 52
Joined: Fri Jul 31, 2015 7:37 am

Re: The os_realloc() API

Postby dkinzer » Tue Sep 01, 2015 10:07 pm

kolban wrote:The question, of course ... is how valid is this notion?
I've been using it for months now and it seems to work fine.
Don Kinzer
Beaverton, OR, USA

eriksl
Posts: 159
Joined: Fri May 22, 2015 6:22 pm

Re: The os_realloc() API

Postby eriksl » Sat Sep 05, 2015 2:07 am

(sarcastic mode on)

How much effort would it take to at least add this one line to an include file...

It's always the same problem, no prototypes.

User avatar
kolban
Posts: 131
Joined: Tue Jun 16, 2015 1:09 pm
Location: Fort Worth, Texas, USA

Re: The os_realloc() API

Postby kolban » Tue Sep 22, 2015 3:09 am

I am delighted to find that in SDK 1.4, we now have a definition for "os_realloc" in mem.h.

Thanks guys!!

Neil

eriksl
Posts: 159
Joined: Fri May 22, 2015 6:22 pm

Re: The os_realloc() API

Postby eriksl » Wed Sep 23, 2015 12:03 am

I hope all other functions present in de SDK libs now have proper prototypes.

Who is online

Users browsing this forum: No registered users and 27 guests