brucexs wrote:

>With minsize of 8, 
>vec[1] ="1234"  ;; 8 bytes allocated, five used (zero byte at end)
>vec[1] = "123456"  ;; re-used the same 8 bytes
>vec[1] = "1234567890123" ;; now first 8 bytes freed, new 14 bytes 
>buffer allocated
>
>Vec plugin will also shrink allocated memory in some circumstances 
>if an element with a large allocatoin is re-assigned a much smaller 
>string.
>
>The idea is to avoid excessive calls to system memory allocator.  
>

Thanks for the explanation, Bruce. 

What happens with vectors where the minsize param is not set?  Is each 
element allocated a standard large-ish amount of memory & given new 
memory every time it gets a new value?  Or is the original memory 
adjusted each time?

Thanks again,
Karen



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~-> 

Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to