[ZODB-Dev] large C extension objects / MemoryError

Steve Alexander steve@cat-box.net
Fri, 26 Oct 2001 23:36:31 +0100


Andrew Dalke wrote:

> Jeremy:
> 
>>For this approach to effectively reduce the amount of memory, the C
>>struct needs to have pointers to other objects that can be released
>>when its becomes a ghost.  If the memory is all allocated in one block
>>(like a Python string or tuple), then there's no advantage to becoming
>>a ghost.
>>
> 
> Ahhh, well.  Then I'm outta luck on that approach since all
> that's inside a C structure.


You could try adding them to an OOBTree rather than a PersistentMapping. 
At least with a BTree, each of its Buckets is a separate persistent 
object. That might help you limit the amount of data you load in when an 
object is activated.

--
Steve Alexander
Software Engineer
Cat-Box limited