GSS memory allocation initial cut for review

Nico Williams nico at cryptonector.com
Tue Oct 4 12:43:03 EDT 2011


On Tue, Oct 4, 2011 at 5:34 AM, Kevin Wasserman <krwasserman at hotmail.com> wrote:
> We could pick a registry key that, if present, specifies the dll and
> malloc/free  functions to use and only fall back to HeapAlloc if it's not
> set.  Then the question becomes,
> when do we check the registry key?  On every alloc/free?
> On process init?

I would think on process init, otherwise you'd risk freeing memory
with the wrong allocator.

There are other less invasive solutions, such as having the mechglue
track all the buffers returned by providers and then looking up each
buffer address to find which provider's release_buffer entry point to
call.  This is something I've wished to avoid, but Windows makes me
sad enough about the common allocator approach that I'd consider it.
Let's see what Jeff says about the configurable GSS allocator DLL idea
-- that'd be the least disruptive approach for you at this point,
after all.

Nico
--




More information about the krbdev mailing list