![]() |
Container library without heap usage
Hi,
knows someone a library for container classes like lists, maps, etc. which is implemented without heap usage (no dynamic memory usage at all). Example class A { Node node; // Required by List<T> // Other class A stuff }; List<A> list; A a; list.push(a); Have a nice day! |
Re: Container library without heap usage
sh wrote:
> Hi, > > knows someone a library for container classes like lists, maps, etc. > which is implemented without heap usage (no dynamic memory usage at > all). Example What would it use instead? |
Re: Container library without heap usage
On May 4, 2:01*pm, Vladimir Jovic <vladasp...@gmail.com> wrote:
> sh wrote: > > Hi, > > > knows someone a library for container classes like lists, maps, etc. > > which is implemented without heap usage (no dynamic memory usage at > > all). Example > > What would it use instead? The classes likely have to provide some stuff required by the particular container. The example indicates this with the Node member of class A. In C you have something similar available via <sys/ queue.h> in FreeBSD for example. |
Re: Container library without heap usage
sh wrote:
> On May 4, 2:01 pm, Vladimir Jovic <vladasp...@gmail.com> wrote: >> sh wrote: >>> Hi, >>> knows someone a library for container classes like lists, maps, etc. >>> which is implemented without heap usage (no dynamic memory usage at >>> all). Example >> What would it use instead? > > The classes likely have to provide some stuff required by the > particular container. The example indicates this with the Node member > of class A. In C you have something similar available via <sys/ > queue.h> in FreeBSD for example. You can take a look at stl port - it might have that option. |
Re: Container library without heap usage
On May 4, 12:50*pm, sh <seb...@gmail.com> wrote:
> Hi, > > knows someone a library for container classes like lists, maps, etc. > which is implemented without heap usage (no dynamic memory usage at > all). Example > > class A { > * Node node; // Required by List<T> > * // Other class A stuff > > }; > > List<A> list; > A a; > > list.push(a); > Take a look at boost.intrusive. -- Giovanni P. Deretta |
Re: Container library without heap usage
On May 4, 4:47*pm, gpderetta <gpdere...@gmail.com> wrote:
[...] > Take a look at boost.intrusive. > > -- > Giovanni P. Deretta Thanks a lot, this was exactly the thing I needed. |
Re: Container library without heap usage
"sh" <sebhub@gmail.com> wrote in message
news:2ec134d2-0a0c-4554-b797-31a41261ba22@o8g2000yqo.googlegroups.com... On May 4, 4:47 pm, gpderetta <gpdere...@gmail.com> wrote: [...] > > Take a look at boost.intrusive. > Thanks a lot, this was exactly the thing I needed. You might be interested in this as well: http://groups.google.com/group/comp....d5f353c493e56a |
Re: Container library without heap usage
On Tue, 2010-05-04, sh wrote:
> On May 4, 2:01*pm, Vladimir Jovic <vladasp...@gmail.com> wrote: >> sh wrote: >> > Hi, >> >> > knows someone a library for container classes like lists, maps, etc. >> > which is implemented without heap usage (no dynamic memory usage at >> > all). Example >> >> What would it use instead? > > The classes likely have to provide some stuff required by the > particular container. The example indicates this with the Node member > of class A. In C you have something similar available via <sys/ > queue.h> in FreeBSD for example. OK, but then it's not not a container class -- it doesn't really own the things it "contains", nor manage their lifetimes. Might be useful, but it's not a container. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
| All times are GMT. The time now is 11:42 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.