Re: Proposed addition of malloc_size_np()
- From: Peter Jeremy <peterjeremy@xxxxxxxxxxxxxxxx>
- Date: Sat, 25 Mar 2006 19:10:38 +1100
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"
- Follow-Ups:
- Re: Proposed addition of malloc_size_np()
- From: Poul-Henning Kamp
- Re: Proposed addition of malloc_size_np()
- References:
- Proposed addition of malloc_size_np()
- From: Jason Evans
- Re: Proposed addition of malloc_size_np()
- From: Poul-Henning Kamp
- 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
- Re: Proposed addition of malloc_size_np()
... In message, Peter Jeremy writes: ... but wonder if it would be smarter
to make it ... to you is actually an unadultered malloc pointer. ... (freebsd-arch) - Re: [PATCH RT 00/02] SLOB optimizations
... > Linux's memory management is starting to show it's age. ... The slab
allocator is indeed complex, messy, and hard to understand. ... +#undef CACHE +}; +EXPORT_SYMBOL;
+ +struct cache_names { ... +void *kzalloc+{ ... (Linux-Kernel) - [PATCH 1/3] kmemcheck: add the kmemcheck core
... Subject: kmemcheck: add the kmemcheck core ... detects use of uninitialized
memory. ... +static unsigned int error_count; ... +static void ...
(Linux-Kernel) - [RFC][PATCH 08/12] memory hotplug: sysfs and add/remove functions
... This adds generic memory add/remove and supporting functions ... extern int
devices_init; ... +void unregister_memory_notifier ... +/* reasonably generic interface
to expand the physical pages in a zone */ ... (Linux-Kernel) - [PATCH 07/11] memory hotplug: sysfs and add/remove functions
... This adds generic memory add/remove and supporting functions ... extern int
devices_init; ... +void unregister_memory_notifier ... +/* reasonably generic interface
to expand the physical pages in a zone */ ... (Linux-Kernel)