Re: Proposed addition of malloc_size_np()



On Sat, 2006-Mar-25 08:46:36 +0100, Poul-Henning Kamp wrote:
In message <44247DF1.8000002@xxxxxxxxxxx>, Jason Evans writes:
=== Proposal ===
Add malloc_size_np() to libc, and provide the prototype in malloc_np.h:

size_t
malloc_size_np(const void *ptr);

I'm for the concept, but wonder if it would be smarter to make it

void *
malloc_np(size_t, size_t *)

so we can do it in one go ?

That restricts its use to malloc() wrappers. I can also see the
benefit in a function trying to validate the size of an arbitrary
piece of memory that has been passed to it.

--
Peter Jeremy
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"



Relevant Pages