Re: Continuously concatenating binary data
From: K_Lee (Google_Post_at_slink-software.com)
Date: 10/16/03
- Next message: Mike Wahler: "Re: To STL or not to STL"
- Previous message: Mike Wahler: "Re: To STL or not to STL"
- In reply to: Victor Bazarov: "Re: Continuously concatenating binary data"
- Next in thread: Nitin Rajput: "Re: Continuously concatenating binary data"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 16 Oct 2003 11:36:55 -0700
Just a thought:
If your user have small amount of memory or record large
amount of data, all your malloc/realloc will turn into
swap disk i/o.
It would be no differents than stream approach.
In fact stream give you better control on amount of memory
your app needs.
-- The source is out there. Browse and document open/share source projects such as Apache, Tcl, Ethereal, Mozilla, .Net SSCLI. http://www.slink-software.com "Victor Bazarov" <v.Abazarov@attAbi.com> wrote in message news:<J2yjb.292805$mp.232723@rwcrnsc51.ops.asp.att.net>... > "Unforgiven" <jaapd3000@hotmail.com> wrote... > > I have an application, where I continuously get new binary data input, in > > the form of a char*. This data comes from the Windows Multimedia wave > input > > functions, but that's not important. What it means is that every 2 > seconds, > > I need to add 22050 bytes to an ever expanding buffer. I have no idea at > the > > beginning how large this buffer would need to be. > > What do you need the buffer for? Do you use it right away? Does > the buffer have to be contiguous during your input? > > If not, use a list<your22050bytes>. I suspect that even if you do > need to use the "stream" right away, the list is quick enough for > all your streaming needs. > > > [...] > > Victor
- Next message: Mike Wahler: "Re: To STL or not to STL"
- Previous message: Mike Wahler: "Re: To STL or not to STL"
- In reply to: Victor Bazarov: "Re: Continuously concatenating binary data"
- Next in thread: Nitin Rajput: "Re: Continuously concatenating binary data"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|