> On Apr 28, 2015, at 5:04 PM, Jed Brown <[email protected]> wrote:
> 
> Barry Smith <[email protected]> writes:
>>> How do you communicate to the accessor that the memory has been freed?
>>> 
>>  Accessor? What is accessor?
> 
> The code that accesses the memory behind the pointer (via the pointer or
> otherwise).

  The special malloc would need to save the locations at which it set the 
addresses and then switch the address to NULL. Then the code that used those 
locations would have to know that they that they may be set to NULL and hence 
check them before use.

  I am not saying this particular thing would be practical or not, just that if 
we had a concept of a malloc context for each malloc there are many games we 
could try that we couldn't try otherwise and this is just one of them.

  Barry


Reply via email to