Re: Proposed addition of malloc_size_np()
- From: Andrew Reilly <andrew-freebsd@xxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 27 Mar 2006 08:03:41 +1100
On Sat, Mar 25, 2006 at 09:19:23AM +0100, Poul-Henning Kamp wrote:
In message <20060325081037.GC703@xxxxxxxxxxxxxxxxxxxxxxx>, Peter Jeremy writes:
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.
No you can't, because you cannot be certain that the pointer passed
to you is actually an unadultered malloc pointer.
Or even that it was 'alloc'd at all. Could be a pointer (in)to a
static or global...
--
Andrew
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"
- References:
- Re: Proposed addition of malloc_size_np()
- From: Peter Jeremy
- Re: Proposed addition of malloc_size_np()
- From: Poul-Henning Kamp
- Re: Proposed addition of malloc_size_np()
- Prev by Date: Re: Proposed addition of malloc_size_np()
- Next by Date: Re: Proposed addition of malloc_size_np()
- Previous by thread: Re: Proposed addition of malloc_size_np()
- Next by thread: Re: Proposed addition of malloc_size_np()
- Index(es):
Relevant Pages
|
|