Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] Valgrind on 2.2.2

Tim Peterstim.one@comcast.net
Mon, 28 Oct 2002 20:36:50 -0500


[Guido]> ...> (I wonder if pymalloc adds to the confusion, since its arenas count as> a single block to malloc and hence to valgrind, but are internally cut> up into many objects.)For each arena, the address returned by malloc() is stored in thefile-static arenas[] vector.  So if a diagnostic program can find thatvector, it can find the base address of every arena gotten from malloc.In a debug build, though, pymalloc adds pad bytes to both ends of eachrequest (and whether handled by pymalloc or by malloc!), and returns theaddress of the byte beyond the leading pad byte.  This can leave any numberof system-malloc blocks with no direct pointer to their start.  That'sspecific to the debug build, which forces all Python mem API calls to gothru pymalloc (the release build only directs PyObject_{Malloc,etc}() callsto pymalloc).


[8]ページ先頭

©2009-2025 Movatter.jp