|
From: Julian S. <js...@ac...> - 2006-08-23 19:39:10
|
> I have done some tests, and the huge memory consumption is probably due to > a memory leak when doing segment deallocation. It would probably help if you allocated the bitmaps using VG_(am_shadow_alloc) rather than VG_(malloc). (grep for examples of usage). This reduces the extent to which client and shadow address spaces are interleaved. One problem with VG_(am_shadow_alloc) is you can't then free the result (ever); but you could put "freed" bitmaps on a freelist and first allocate from there. Does that make sense? It's worth a try. Can you try it? I mentioned this because a similar problem bit me during early development of memcheck. If the shadow data (bitmaps) and client data end up being finely interleaved in the address space, then much of the shadow data is covering areas of address space which is occupied by shadow data (if you see what I mean) and so the space usage can become very inefficient. This is the first thing I would try. > Was my explanation comprehensible, or should I illustrate it with a picture > ? You mean this message? > Before I can say something about the memory use of drd, I have to > explain its algorithm. In short, the data race detection algorithm works as > follows: [...] It helps, but (1) it still does not define the terms "detected race" and "actual race", and (2) you also need to say what a vector clock is. > BTW: thanks for the patch ! No probs. Nice to see drd progressing. J |