Thanks for all the explaining on cycle copying -- that helps me to understand
what's going on.

>> PS. Have you ever ran xcircuit through Valgrind's memcheck? 
> 
> No, I haven't, although I occasionally run programs linked to the
> TCL_MEM_DEBUG version of Tcl/Tk.  I don't really know how the two methods
> compare for efficacy.  I guess the Tcl memdebug is better for detecting
> out-of-bounds array access;  it allows one to check for what memory has
> not been freed when the program exits.  However, if you depend on the
> OS to free a bunch of allocated memory on exit, then it isn't much help
> in finding ongoing memory leaks.

Just to give you an idea of what Valgrind is:
it is a virtual machine that dynamically rewrites machine code with 
instrumentation.

Valgrind + memcheck rewrites each machine instruction to instrument it for 
accessing
undefined data at the level of individual bits, as well as out-of-bounds access 
etc.
Every bit of memory is marked as to whether it has been defined or not. Memory
freed by free() is marked as undefined again, etc. System calls are similarly 
instrumented
keeping their semantics in mind. It's a very powerful tool.

There is no substitute for Valgrind. If you use undefined bits anywhere, it 
will catch it,
no ifs, no buts. By "using" undefined bits it's meant that they are used to 
make decisions
(conditional jumps & other conditional execution) based on flags, or passed to 
system calls
-- merely copying undefined bits around can be quieted out IIRC. Expect the 
initial run to be noisy ;)

Cheers, Kuba
_______________________________________________
Xcircuit-dev mailing list
[email protected]
http://www.opencircuitdesign.com/mailman/listinfo/xcircuit-dev

Reply via email to