On Tuesday, May 08, 2007 12:23:40 PM -0400 Derrick J Brashear
<[EMAIL PROTECTED]> wrote:
On Tue, 8 May 2007, chas williams - CONTRACTOR wrote:
In message
<[EMAIL PROTECTED]>,Derr ick
J Brashear writes:
allocate an extra amount of memory for each allocation, making it
aligned, and put a tag saying how to free it in each allocation, then
the alloc/free package and not the caller can decide how to allocate.
this doesnt resolve the issue of 'is it safe for me to perform my
operation with the memory the allocator gave me?' for instance,
it might not be safe to performance certain operations under a
lock with pageable (from vmalloc) memory.
set a flag when you get the memory to ask for what you need.
of course, if you ask for non-pageable memory and you can't get it, then
what?
Fortunately, we don't have this problem, because callers in AFS make no
distinction regarding what kind of memory they get. This is not a
general-purpose public interface; it's an interface for use within AFS, and
so it's entirely reasonable to make assumptions and then insure (in the
memory allocator) that those assumptions are true.
-- JEff
_______________________________________________
OpenAFS-devel mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-devel