GSS memory allocation initial cut for review

Kevin Wasserman krwasserman at hotmail.com
Tue Oct 4 06:34:13 EDT 2011


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?

-----Original Message----- 
From: Nico Williams 
Sent: Monday, October 03, 2011 2:54 PM 
To: Sam Hartman 
Cc: kevin.wasserman at painless-security.com ; krbdev at mit.edu 
Subject: Re: GSS memory allocation initial cut for review 

Sam, Kevin,

I've been meaning to comment on this...

I'm perfectly fine with a mechglue requiring that it's providers do
something in particular for memory allocation.  The mechglue specifies
its own SPI, since no standard SPI exists, and memory allocation can
be part of the SPI.

Can we require *all* mechglues and providers in a process to do the
same?  Well, on Unix it'd certainly work.  Jeff explains that on
Windows this means losing the ability to use advanced memory debugging
libraries, which, to me, seems like a big deal.

At first glance I'm tempted to conclude that the problem is that one
mechglue cannot impose these sorts of requirements on other mechglues.
It seems like a matter of principle.

However, I wonder if we couldn't have an agreed convention that on
Windows mechglues must use a memory allocator provided by a specific
DLL, and let that DLL select an actual allocator via configuration.
Would this solve Jeff's issue?  I think it should, but then, I'm not a
Windows expert.

Nico
--
_______________________________________________
krbdev mailing list             krbdev at mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev



More information about the krbdev mailing list