Tim Peters wrote: > pymalloc ensures 8-byte alignment. This is one plausible reason to > keep the current int free list: an int object struct holds 3 4-byte > members on most boxes (type pointer, refcount, and the int's value), > and the int freelist code uses exactly 12 bytes for each on most > boxes. To keep 8-byte alignment, pymalloc would have to hand out a > 16-byte chunk per int object, wasting a fourth of the space (pymalloc > always rounds up a requested size to a multiple of 8, and ensures the > address returned is 8-byte aligned).
Hmmm... the funny thing is that the freelist approach is showing higher memory consumption than the PyMalloc approach for the int case... -- ------------------------------------------------------------------------- Andrew I MacIntyre "These thoughts are mine alone..." E-mail: [EMAIL PROTECTED] (pref) | Snail: PO Box 370 [EMAIL PROTECTED] (alt) | Belconnen ACT 2616 Web: http://www.andymac.org/ | Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com