RFC 17: Dynamic Array Sizing

Tamas Szekeres szekerest at GMAIL.COM
Mon May 15 05:42:07 EDT 2006


2006/5/15, Frank Warmerdam <warmerdam at pobox.com>:

> > Is it possible to add the new items automatically on demand?
> I think that is what I'm proposing!  In what sense do you mean?

I have mentioned to eliminate the following issues from the code, like:
mapfile.c (4663)

      if(map->numlayers == MS_MAXLAYERS) {
	    msSetError(MS_IDENTERR, "Maximum number of layers reached.",

When the program needs more items of a particular time it should
allocate it automatically. I couldn't read this from the RFC, but it
may be there and i have missed it.

> > Could we use a compiler switch to revert to the statically allocated
> > behaviour if needed?
> The compromise is to retain the current values for the MS_MAX* macros
> as *initial* allocations.  So essentially our initial allocation is
> the current situation and the dynamic growth only comes into play when
> those values are exceeded.

OK, Agreed

Best Regards,


More information about the mapserver-dev mailing list