Barry Smith <bsm...@mcs.anl.gov> writes:
>   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.

And then PetscMalloc(...,&tmp); foo->data = tmp; creates SEGV at some
unpredictable time.  Awesome!

>   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.

I'm not convinced, except in the case of mixing in madvise hints.

Attachment: signature.asc
Description: PGP signature

Reply via email to