[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Static pools?

From: Greg Stein <gstein_at_lyra.org>
Date: 2003-03-09 08:26:56 CET

On Sat, Mar 08, 2003 at 06:17:51PM +0000, Matthew Hambley wrote:
>...
> Simple. I want to create a mapping table which needs to exist between
> calls to the interrogation function. This involves parsing a file. I
> could parse the file every time the data needs to be interrogated (and of
> course that is what I will need to do if there isn't space to build the
> table) but that would require a lot of file access and a lot of time.
> Better to do it as infrequently as possible.

I'm not clear on why you don't just malloc the thing? If you want memory
from the heap, and want it for the duration of the process, then just use
malloc. I'm not sure that a pool will buy you anything.

> Thinking OO for a moment, what I want is a static member variable.

That's not OO. That's just another way to describe a global variable.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Mar 9 08:25:47 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.