Re: NewPtr vs malloc
Re: NewPtr vs malloc
- Subject: Re: NewPtr vs malloc
- From: Jim Correia <email@hidden>
- Date: Sun, 9 Dec 2001 10:02:30 -0500
On Sunday, December 9, 2001, at 06:26 AM, Ondra Cada wrote:
TZJ> You can get size of that block GetPtrSize(ptr) or tell user
"malloc_size" of standard API.
They do not do the same thing.
The documentation for GetPtrSize says "The GetPtrSize function returns
the logical size, in bytes, of the nonrelocatable block pointed to by p.
In case of an error, GetPtrSize returns 0."
The documentation for malloc_size says
Malloc_size returns the size of the block pointed to by
the argument. The size is always at least the requested
size, and is often a few words larger.
Jim