Hi people,

I'm considering writing another plugin.

It'll be database-like, binary file-format-like, xml-like.

It'll have all the basic types that XML has (elements, attributes, comments, text, etc) and an XML tree node model. However, internally, in terms of it's implementation, although you don't get to see this or have any control over it... any XML node may be stored in RAM or on disk or on both! Obviously the idea is to get high speeds, while still being RAM efficient.

Well... I'm thinking, as a design, it would be nice to have my plugin able to promise to not use more than a certain amount of RAM. I could have a ".CacheSize as integer" property. So as part of that promise, when required memory exceeds that limit, the extra data is saved to disk and flushed from RAM.

Now to keep that promise, it would be nice to have some control over the memory management. For example, with malloc, you can't really be sure of how much RAM is allocated. I'd like to just allocate a block, say 16MB at first, and then suballocate out of there. I'd also like to know if I can't allocate from that 16MB (or whatever size it is), so I can start freeing cached data.

Anyone know of some good code to manage memory like this?

--
http://elfdata.com/plugin/



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to