On Wednesday 19 December 2001 12:29 pm, Mladen Turk wrote: > I understand that 100%, but as you said, lets go further... I think of apr > as the best peace of code that I've ever seen. The pools as concept is > excellent, but IMO there has to be the way that someone use the apr as a > genereral libc. For example try to implement a simple recursive sorting > algorithm using apr, and you will end up with cca. 1GB for a 10000 elements. > IMO there has to be some kind of a implicit free, or the apr will become > something like java or vb that no-one really knows how the bugger really > works. > > In general I only want to be able to do a simple thing like: > !SYSTEM.FREEMEM 101000 > char *dummy = apr_palloc(somepool, 1000); > !SYSTEM.FREEMEM 100000 > apr_pfree(somepool, dummy); > !SYSTEM.FREEMEM 101000
So there is a hack to do this, that will work: #define apr_malloc() apr_subpool_create() #define apr_free() apr_destory_pool() Ryan ______________________________________________________________ Ryan Bloom [EMAIL PROTECTED] Covalent Technologies [EMAIL PROTECTED] --------------------------------------------------------------
