|
64
results for
growable
array
|
Simple C containers, std::vector analog
Basically, I don't need a vector, just a growable array with the ability to add elements to the back, and a forward iterator from the front. ... This is where there are generally going to be more elements in the growable array than the size of a memory page. I want to avoid reallocation, but I want the pointers to ...
Mar 17 2005 by Ross A. Finlayson
- 9 messages - 2 authors
|
growable arrays: realloc vs. linked list?
rand mair fheal mair_fh...@www.yahoo.com comp lang c In article <c3905b22. 0108071537.7fe3c...@posting.google.com>, ger...@cs.ucsb.edu (gerard) wrote: hi problem: i have an array of items. this array will grow (but not really shrink) during execution. new items are just appended and not inserted in the middle. each ...
Aug 7 2001 by rand mair fheal
- 7 messages - 5 authors
|
Which language pays most? Smalltalk, not C++ nor Java.
Once mistake and you accidentally expand the array up to 2 billion elements and things can get hairy. Woops. My mistake. That should have been something like: ! ! a.make (1,20) --minindex, maxindex Of course, arrays are growable (resizable). If you use an array that shouldn't be larger than a certain size, ...
Jan 18 1998 by Loryn Jenkins
- 323 messages - 104 authors
|
Question about link list
Especially when you want something like a growable array. Another point in favour of linked lists is that sorted insertion and delete operations are very fast. Writing a list to file and reading it again are rather complex operations. As you correctly observed it makes no sense writing the pointers to a file. ...
Mar 23 1999 by Stephan Wilms
- 6 messages - 6 authors
|
Struct and proper coding technique
Ollie, I'm not one of the "experts" here, but I'd use a linked list for something like this. You really seem to want an growable array of strings, but linked list is how that would be implemented (I think). John Energy is Eternal Delight. He who desires but acts not, breeds pestilence. William Blake.
Jun 14 1999 by John Estess
- 8 messages - 7 authors
|
change in c
for very small lists just using a buffer is much more efficient. another container is the flexible array. this is a growable array, of elements of the same size, or an array of void pointers if you want different size. there, the overhead is less since there is no "next" pointer in each element.
Sep 17 by jacob navia
- 68 messages - 19 authors
|
Why this line is incompatible?
If you want full flexibility then an array of pointers to the subnodes for a ternary (it is ternary not trinary as far as I know) is needed. If the number of subnodes may vary a lot and is indefinite you must use a list (single linked or double linked - take your pick) or a growable/shrinkable array. ...
Jul 31 1998 by Alf_Sa...@logitech.com
- 5 messages - 4 authors
|
Which language pays most? Smalltalk, not C++ nor Java.
Isn't this a breaking of the fundamental rule that definition is initialization that generally works so well in OO systems, particuarly for a fundamental thing like an array? Also, I don't see where you are defining a maximum size for the array. If its dynamically growable, that's nice. But placing an upper limit ...
Jan 17 1998 by Dean Roddey
- 323 messages - 104 authors
|
Simple C containers, std::vector analog
Ross A. Finlayson r...@tiki-lounge.com comp lang c Hi, I wonder about this notion of the growable array. Basically, it seems a sound idea: avoid reallocation except for the page or "block" pointers, because the runtime could have any of a variety of behaviors in its memory allocator(s). So, I make a type, ...
Mar 19 2005 by Ross A. Finlayson
- 9 messages - 2 authors
|
growable arrays: realloc vs. linked list?
GSO.4.21.0108072049380.14229-100000@miller>, gerard sychay <ger...@cs.ucsb.edu> wrote: also, as another example, is adding new linked list nodes faster than using realloc to resize the array? i would guess that it is, since realloc must copy the entire array. is that right? if so, is the difference that much? if ...
Aug 8 2001 by rand mair fheal
- 7 messages - 5 authors
|
|
|