[Bf-committers] memory allocation and crashes

Ton Roosendaal ton at blender.org
Wed Jan 31 10:23:02 CET 2007


Hi,

> One thing that might be good would be to write a SIGSEGV handler that  
> saves the undo buffer on crashes.   I think you'd have to write a  
> special function in guardedalloc where it  would use a special  
> pre-allocated "crash-safe" pool of memory if malloc returned NULL.   
> Then all the file writing code would use this for allocation.

Also note that such a handler should not be used for crashes in  
general. Memory then can be corrupted in ways that screw up .blend  
files in ways you might only find out much later. (Tested during 90ies,  
and rejected for that reason).

-Ton-

------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton at blender.org  
http://www.blender.org



More information about the Bf-committers mailing list