Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
One consequence of perl's list implementation is that queues implemented using perl lists end up "creeping forward" through the preallocated array space leading to reallocations even though the queue itself may never contain many elements.What is the proper (and perlish) way to implement a queue that won't leak memory? And is there already a CPAN module that implements it?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to implement a Queue that doesn't leak memory?
by hippo (Archbishop) on Feb 03, 2024 at 13:15 UTC | |
by LanX (Saint) on Feb 03, 2024 at 14:09 UTC | |
by hippo (Archbishop) on Feb 03, 2024 at 16:47 UTC | |
by LanX (Saint) on Feb 03, 2024 at 17:13 UTC | |
by eyepopslikeamosquito (Archbishop) on Feb 04, 2024 at 02:13 UTC | |
by Anonymous Monk on Feb 05, 2024 at 14:19 UTC | |
Re: How to implement a Queue that doesn't leak memory?
by ikegami (Patriarch) on Feb 04, 2024 at 03:32 UTC | |
Re: How to implement a Queue that doesn't leak memory?
by sectokia (Friar) on Feb 06, 2024 at 01:52 UTC |