[Python-Dev] pymalloc killer (original) (raw)
David Abrahams David Abrahams" <david.abrahams@rcn.com
Fri, 29 Mar 2002 18:46:28 -0500
- Previous message: [Python-Dev] pymalloc killer
- Next message: [Python-Dev] pymalloc killer
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
----- Original Message ----- From: "Martin v. Loewis" <martin@v.loewis.de>
"David Abrahams" <david.abrahams@rcn.com> writes:
> ...isn't this part just a little too complicated? If I understand > correctly, arenas are 4K aligned pages. No, arenas are 256k areas which are split into 4k pools. > Given an address, when you find its pool header, you either find a > valid arena header that covers all 4K subsequent addresses, or some > alien memory. I think you just have to look for the address of the > pool header at the appropriate index in the vector. IOW, there > should be no need to look at the address you're deallocating after > finding its putative arena. The pool in question and the arena it belongs to may have different starting addresses (in 63 of 64 cases, they will be different). Of course, you could also build the table for pool addresses, assigning pool indices - but that would require 64 times as much memory.
OK, but I guess my question still holds: can't you just round down to find a supposed arena address, look up the index, and see if that arena is in the vector?
-Dave
- Previous message: [Python-Dev] pymalloc killer
- Next message: [Python-Dev] pymalloc killer
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]